File: FAQ-pdfpagelabels.html

package info (click to toggle)
texlive-doc 2005.dfsg.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 125,100 kB
  • ctags: 12,558
  • sloc: xml: 24,267; perl: 14,394; makefile: 727; sh: 324; lisp: 276; java: 159; sed: 4
file content (37 lines) | stat: -rw-r--r-- 2,220 bytes parent folder | download
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
<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 it confuses
<i>hyperref</i> since there are pages which seem (to
<i>hyperref</i>) to have the same page number.  Fortunately, there are
configuration options to make <i>hyperref</i> "do the right
thing".
<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 'ii' and '2'.
  (If the option is set '<code>true</code>' - the default -
  <i>hyperref</i> writes page anchors as the arabic form of the
  absolute page number, rather than the formatted form.)
<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) 'ii (4
  of 40)' rather than simply '4 of 40'.
</dl>
The two should be used whenever page numbering is not just
'1<code>..</code>n'; they may be used independently, but usually are not.
<p>The recipe isn'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 "<a href="FAQ-hyperdupdest.html">duplicate destinations</a>"
will happen in this case, regardless of the options.
<dl>
<dt><tt><i>hyperref.sty</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/hyperref.zip">macros/latex/contrib/hyperref</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/hyperref.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/hyperref/">browse</a>)
</dl>
<p>
<p><p><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>