# How do I make my pdf Page1 correspond to my Latex Page 1

In my pdf, 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?

Thanks

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

-
What documentclass are you using? With the book class, and \frontmatter/\mainmatter hyperref does that automatically. –  Caramdir Sep 18 '10 at 16:28
hmm.. i'm using a custom class, but when I compile with the book class, it still does the same thing. (starting the PDF document with with cover page as Page 1. I'm using the bookmarks package instead of hyperref though, as I wanted to create sidebar bookmarks –  Noli Sep 18 '10 at 16:36
btw, if you don’t want to use acrobat: it works with evince. –  Caramdir Sep 18 '10 at 17:58
One would hope it also works fine in gv(1) -- certainly that works fine with PostScript files with DSC comments that give the human-level page numbers. –  SamB Dec 19 '10 at 4:18

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.

-
This is the correct approach. Tufte actually numbered some of his books this way. A better way IMHO is to have a switch for documents that are primarily intended to be read on screen versus printed documents. (I have been trying to do this so far with Javascript but so far I have not been very successful! Any tips welcomed.) –  Yiannis Lazarides Sep 18 '10 at 19:26
@Yiannis Lazarides: What do you mean by "have a switch"? Something you can set at compile-time to say "format for printing" vs "format for screen" (I have done this, it's simple)? Or maybe you want the page numbering to look one way when viewing the PDF on screen and another way when printing it (I have done this too, using PDF layers, but it's less simple)? Or something else? –  Lev Bishop Sep 19 '10 at 3:14
@Lev: I would advise not doing anything like that to page numbers with PDF layers; it could be really confusing for users (not to mention a pain to deal with for cross-references). –  SamB Dec 19 '10 at 4:20
@SamB: I agree that it's not a really good idea to mess with these things using layers and it only really works right when you don't have cross references. I only did it because someone asked if it was possible. –  Lev Bishop Dec 19 '10 at 18:17
@Lev: not only when you don't have cross references, but also when readers won't be trying to refer to specific pages, really... –  SamB Dec 19 '10 at 22:24
show 1 more comment