summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-pdfpagelabels.html
blob: a67f243fcc153affb7453554af7091d18ce1f758 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<head>
<title>UK TeX FAQ -- question label pdfpagelabels</title>
</head><body>
<h3><i>Hyperref</i> and repeated page numbers</h3>
<p/>The <i>book</i> class (and its friends and relations) automatically
changes the display of page numbers in the frontmatter of the document
to lower-case roman.  This is fine for human readers, but if
<i>hyperref</i> has been misconfigured, the existence of pages have
the same page number can cause problems.  Fortunately, the
configuration options to make <i>hyperref</i> &#8220;do the right
thing&#8221; are (by default) set up to avoid problems.
<p/>The two options in question are:
<dl>
<dt><code>plainpages=false</code><dd> Make page anchors using the
  formatted form of the page number.  With this option,
  <i>hyperref</i> writes different anchors for pages &#8216;ii&#8217; and &#8216;2&#8217;.
  (This is the default value for the option, which is a 
  <em>good thing</em>\dots)
  If the option is set &#8216;<code>true</code>&#8217; <i>hyperref</i> writes page
  anchors as the arabic form of the page number, rather than the
  formatted form that gets printed; this is not usually appropriate.
<dt><code>pdfpagelabels</code><dd> Set PDF page labels; i.e.,
  write the value of <code>\</code><code>thepage</code> to the PDF file so that
  <i>Acrobat Reader</i> can display the page number as (say) &#8216;ii (4
  of 40)&#8217; rather than simply &#8216;4 of 40&#8217;.
</dl>
The two should be used whenever page numbering is not just
&#8216;1<code>..</code>n&#8217;; they may be used independently, but
usually are not.
<p/>The recipe isn&#8217;t perfect: it relies on <code>\</code><code>thepage</code> being different
for every page in the document.  A common problem arises when there is
an unnumbered title page, after which page numbers are reset: the
PDFTeX warning of &#8220;<a href="FAQ-hyperdupdest.html">duplicate destinations</a>&#8221;
will happen in this case, regardless of the options.
<dl>
<dt><tt><i>hyperref.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/hyperref.zip">macros/latex/contrib/hyperref</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/hyperref/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/hyperref.html">catalogue entry</a>
</dl>
<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=pdfpagelabels">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=pdfpagelabels</a>
</body>