[Tex/LaTex] How to make the PDF page 1 correspond to the LaTeX page 1

hyperrefpage-numbering

In my PDF file, I have my initial pages for the intro and TOC in Roman numerals, and the pages for the main content in arabic numbers, and I'd like for page 1 of the PDF as shown in Acrobat to correspond to page 1 of the arabic numbers in the PDF in my TeX document. Is there a way to accomplish this?

EDIT: Ok, invalid question. It works as expected in Acrobat. It doesn't work in Okular on Linux, which is why I was misguided.

Best Answer

You can suppress resetting of the page numbering when you change numbering style:

\makeatletter
\def\pagenumbering#1{\gdef\thepage{\csname @#1\endcsname \c@page}}
\makeatother

Now, your \frontmatter can be numbered, eg, from "i" to "xii" and the \mainmatter will start at page "13" rather than page "1". This is non-standard for a printed document, but I find it appropriate for an electronic document, because not all pdf viewers understand the page labelling features, and even with adobe reader there are some contexts (eg printing) where you have to be careful the difference between "page 20" and the 20th page of the pdf.

Related Question