Hello to you all,
I need some help with some page numbering.
I am writing a report which has three distint sections:
1. Pre-report (Table of Contents, Revision History etc) page numbering in lower case roman
2. Main Report (Section 1, Section 2 etc) page numbering in arabic starting at 1.
3. Appendices (Appendix A, Appendix B) page numbering as appendix A1, A2, A3 for Appendix A, B1, B2, B3 for Appendix B and so on.
I have been able to do all this, including getting the toc to work (which wasn't easy) but I am taking this a step further.
I also want to add the total number of pages (in the header) so say the pre-report is 5 pages, report is 20, appendix is 5. I want a way of saying page 1 of 30 which will work even when I reset the page count at the start of the report.
I know that this is complicated and I would really appreciate the help.
Thanks.
Page Layout ⇒ Complicated page numbering!
NEW: TikZ book now 40% off at Amazon.com for a short time.
Complicated page numbering!
perhaps the lastpage package could be useful.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Complicated page numbering!
No, I have tried that, unfortunately because I am resetting the page number at the start of the main report and the appendices are number A1, A2, B1, B2 so the \lastpage gives "Page 10 of B2" for example.
What I need is a way of getting the total number of pages. I was thinking about maybe some counter to do it but I don't know how to program that.
What I need is a way of getting the total number of pages. I was thinking about maybe some counter to do it but I don't know how to program that.
Complicated page numbering!
You can try this in the preamble :pooley343 wrote:What I need is a way of getting the total number of pages. I was thinking about maybe some counter to do it but I don't know how to program that.
Code: Select all
\usepackage{everyshi}
\makeatletter
\let\totalpages\relax
\newcounter{mypage}
\EveryShipout{\stepcounter{mypage}}
\AtEndDocument{\clearpage
\immediate\write\@auxout{%
\string\gdef\string\totalpages{\themypage}}}
\makeatother
Regards,
sridhar
OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim