File: FAQ-nofm.html

package info (click to toggle)
tetex-base 3.0.dfsg.3-5
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 239,540 kB
  • ctags: 10,610
  • sloc: xml: 103,461; perl: 9,398; ruby: 2,850; python: 1,551; php: 1,067; sh: 981; lisp: 494; makefile: 371; awk: 88
file content (20 lines) | stat: -rw-r--r-- 1,498 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<head>
<title>UK TeX FAQ -- question label nofm</title>
</head><body>
<h3>Page numbering "&lt;<i>n</i>&gt; of &lt;<i>m</i>&gt;"</h3>

<p>Finding the page number of the last page of a document, from within
the document, is somewhat tricky.  The <i>lastpage</i> package is
therefore supplied to make life easy for us all; it defines a label
<code>LastPage</code> whose number is <em>right</em> (after sufficiently many
passes through LaTeX, of course).  The <i>memoir</i> class also
defines a "last page" label.
<p>The documentation of the <i>fancyhdr</i> package spells out exactly
how one might actually use this information to produce page numbering
as suggested in the question.
<dl>
<dt><tt><i>fancyhdr documentation</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/fancyhdr.tar.gz">macros/latex/contrib/fancyhdr</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/fancyhdr.zip">zip</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/fancyhdr/">browse</a>)
<dt><tt><i>lastpage.sty</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/lastpage.tar.gz">macros/latex/contrib/lastpage</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/lastpage.zip">zip</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/lastpage/">browse</a>)
</dl>
<p><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=nofm">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=nofm</a>
</body>