Is it possible to set page labels in pdfs “correctly”? Pages in my latex documents are numbered 1-x. I'd like the page labels to correspond to the actual page numbers (as mentioned here: http://pdf.editme.com/pdfua-PageLabels).
So that the first page would be “Cover”, pages—let's say—2–5 (with toc and so on) numbered with Roman literals (i, ii, iii, etc.) and pages 6–end numbered with Arabic literals.
How do I achieve that?
Best Answer
Package
hyperref
also adds support for the PDF page labels. It uses\thepage
for this purpose.The cover page can be labeled using
\thispdfpagelabel
:The example also disables the page label for the cover page, because it is unlikely, that it is needed (e.g., page anchors are needed for index entries). Otherwise the page anchor for the cover page (
1
) would clash with the page anchor for the first chapter page (also1
).If the cover pages do not print the page number, then
\thepage
can be redefined, e.g., withCover-
as prefix. With a unique\thepage
the page anchor does not need to be disabled, example: