Page Layout ⇒ Complicated page numbering!
Complicated page numbering!
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.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Complicated page numbering!
Complicated page numbering!
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