summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-nofm.html
blob: 7cf73efc83bdee624546090d0e5e86e9af59a51f (plain)
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 &#8220;&lt;<i>n</i>&gt; of &lt;<i>m</i>&gt;&#8221;</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 &#8220;last page&#8221; 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="http://mirror.ctan.org/macros/latex/contrib/fancyhdr.zip">macros/latex/contrib/fancyhdr</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/fancyhdr/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/fancyhdr.html">catalogue entry</a>
<dt><tt><i>lastpage.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/lastpage.zip">macros/latex/contrib/lastpage</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/lastpage/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/lastpage.html">catalogue entry</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>