Generalhyperref | Page Number Display in PDF Viewer

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
User avatar
justdeath
Posts: 69
Joined: Mon Sep 05, 2011 10:27 am

hyperref | Page Number Display in PDF Viewer

Post by justdeath »

Hello to all!

I've been using LaTeX since 2008, but just yesterday found something which Google search couldn't resolve.

Actually this is about the page counter in the toolbar of the PDF viewer: 1 (1 of 6). This was introduced in hyperref 6.82a:
http://www.tug.org/applications/hyperref/ftp/ChangeLog

I found that when using the book class, if you have, lets say 2 pages of front matter, then the PDF reader will display: i (1 of 4), ii (2 of 4), 1 (3 of 4), 2 (4 of 4).

Code: Select all

\documentclass{book}
\usepackage{hyperref}

\begin{document}
\frontmatter
Front text.
\newpage
Front text (2).

\mainmatter
Main text.
\newpage
Main text (2).
\end{document}
Now if there isn't any front matter:

Code: Select all

\documentclass{book}
\usepackage{hyperref}

\begin{document}
\mainmatter
Main text.
\newpage
Main text (2).
\end{document}
The page numbering stays the same: 1 (1 of 2), 2 (2 of 2). That behavior applies to versions 6.82a-h.

Version 6.81z and previous display book without frontmatter, article, letter, scrartl, etc normally: 1 / 1, 2 / 2.

Therefore versions before 6.82a displays 1 (3 of 4) only when using book with frontmatter.

I use article mainly and that new behavior looks awkward to me.

For now I use 6.81g, but is there a setting to turn this off?
Last edited by justdeath on Tue Sep 20, 2011 6:14 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Re: hyperref | Page Number Display in PDF Viewer

Post by kaiserkarl13 »

I think the specific style you mention (that is, 1 [1 of 2], where [] denotes a box or something) is specific to your PDF editor. Mine (Evince 3.0.2) displays (1 of x) for ALL documents, regardless of hyperref setting.

If you don't like the fact that it says "ii (2 of 20)" and would prefer "2 (2 of 20)", try "\usepackage[pdfpagelabels=false]{hyperref}".

I will admit I actually have no idea what you expected, however.
User avatar
justdeath
Posts: 69
Joined: Mon Sep 05, 2011 10:27 am

Re: hyperref | Page Number Display in PDF Viewer

Post by justdeath »

Yes, you are right.

I am using Adobe Reader and Sumatra PDF, and that page numbering is somehow activated only when viewing documents compiled with hyperref 6.82a or newer.

Foxit Reader and Evince Document Viewer display this page numbering with any version of hyperref.

My mistake.

Nikolay
Post Reply