3

Possible Duplicate:
How do I have two sets of page numbers in a document?

I am trying to make one single file that contains several small components. Each small parts need its own last page. For example, if I have two parts and they have 3 pages and 5 pages, respectively, then I want to have page numbers like

*1 of 3, 2 of 3, 3 of 3, 1 of 5, 2 of 5, 3 of 5, 4 of 5 and 5 of 5*

I tried with lastpage and fancyhdr. And use the following setting

*\fancyhead[R]{\thepage of \pageref{LastPage}}*

And it is giving me only the last last page and the results looks like

*1 of **5**, 2 of **5**, 3 of **5**, 1 of 5, 2 of 5, 3 of 5, 4 of 5 and 5 of 5*

I think maybe there is some way to have what I want if I use the ifthen package also. However, I cannot figure it out by myself.

3

0

Browse other questions tagged .