5

I remember reading somewhere (can't seem to find the actual page now) that in order to avoid duplicate references with hyperref one should switch the page numbering to an "unused" one (say, \alph) for unnumbered pages (eg. the title pages, copyright pages, etc.).

Additionally, one usually uses roman numbers (say, \roman) for the front matter (eg. table of contents, list of figures/tables, introductions, etc.).

It just crossed my mind that, where one to have a longish front matter, this two numberings could clash and you would still get duplicate references. For example, suppose you have 10 unnumbered pages "numbered" a through j, and suppose you have 60 pages of front matter numbered i to dx: wouldn't the "d" in the unnumbered part clash with the "d" in the front matter? is there a way to avoid this?

1
  • 2
    You'd have already a conflict with "i". My opinion is that all pages should have a number (the "outer" frontispiece makes an exception) and all pages should have the same numbering scheme. Numbering front matter pages with Roman numbers is a tradition that nowadays has no reason: it used to be necessary because nobody could know in advance the number of pages in the front matter, which was thus typeset last.
    – egreg
    Nov 14, 2011 at 13:49

2 Answers 2

6

Indeed, there can still be a clash of page numbers, although it is unlikely under normal circumstances. But it can be easily avoided: just modify the "invisible" page numbers to contain something that can never be part of a roman numeral. The following example introduces a new page numbering style myalph, which does nothing but prepend a z to the alph output:

\documentclass{article}

\makeatletter
\newcommand{\@myalph}{z\@alph}
\makeatother

\usepackage{hyperref}

\begin{document}

\pagenumbering{myalph}
\setcounter{page}{9}
test

\newpage
\pagenumbering{roman}
test

\end{document}
1
  • Works like a charm!
    – mpr
    Nov 15, 2011 at 14:41
3

There are five "standard" page numbering styles: arabic, roman, Roman, alph, Alph, and fnsymbol. When there is a clash between alph and roman (i, v, x, l, c, d, m), you could use alph and Roman or Alph and roman or alph/Alph and fnsymbol without the need to redefine anything. (If you are using yet another page numbering style for the backmatter, you might still have to use Vihrov's solution, of course.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .