[Tugindia] Total number of pages
Sridhar M.A.
sridharma at gmail.com
Sun Oct 3 17:48:53 CEST 2004
>
> Here is one way of doing it:
>
> \usepackage{everyshi}
> \makeatletter
> \let\totalpages\relax
> \newcounter{mypage}
> \EveryShipout{\stepcounter{mypage}}
> \AtEndDocument{\clearpage
> \immediate\write\@auxout{%
> \string\gdef\string\totalpages{\themypage}}}
> \makeatother
>
> In second pass \totalpages will give you the total number of leaves
> irrespective of any front/backmatter or increment/decrement of page
> counter.
>
Thanks a lot. That solved my problem.
Regards,
--
Sridhar M.A.
More information about the tugindia
mailing list