Did you ever notice that the page number that your PDF reader gave you was not the same as the page number printed at the bottom of the page? By default, some LaTeX commands, such as \tableofcontents, reset the page number to 1.
I don't like this behaviour. I just want my cover page to be numbered 1, the next to be numbered 2, etcetera. This way, the ‘physical’ and ‘virtual’ page numbers line up nicely. It also prevents some problems with hyperref, which will otherwise create duplicate page labels.
You can get sequential page numbering by putting the following short commands in your document preamble:
\let\oldsetcounter=\setcounter
\renewcommand\setcounter[2]{%
\ifx\not{#1}{page}\oldsetcounter{#1}{#2}\fi}
This simply overrides \setcounter, such that it ignores any attempt to set the page counter, which holds the current page number. Ugly, but it works.
2 comments:
Hey,
nice blog, helped me a lot!!!
keep it up!!
:)
Thanks for the post on numbering, it did the trick for me as well.
Post a Comment