[Tugindia] page_numbering_style

Shanmugam AM shan at river-valley.com
Fri Mar 18 13:45:01 CET 2005


On Fri, 18 Mar 2005, shubhanga aithal wrote:

> Dear members,
> Please help me to produce page numbers  in a  style as
> shown below:
> 1/3, 2/3, 3/3
> where 3 represents the total number of pages in my
> document.

\usepackage{everyshi}
\makeatletter
  \let\totalpages\relax
  \newcounter{mypage}
  \EveryShipout{\stepcounter{mypage}}
  \AtEndDocument{\clearpage
  \immediate\write\@auxout{%
  \string\gdef\string\totalpages{\themypage}}}
  \let\tthepage=\thepage
  \let\thepage\relax
\def\thepage{\tthepage/\totalpages}
\makeatother

ps: three compilations needed.

---
many thanks
Shanmugam AM



More information about the tugindia mailing list