summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-nopageno.html
blob: b755174cb2b3827ec1f8b38680d9f423a2f758eb (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
40
41
42
43
44
45
46
47
48
49
50
<head>
<title>UK TeX FAQ -- question label nopageno</title>
</head><body>
<h3>How to get rid of page numbers</h3>
<p/>The package <i>nopageno</i> will suppress page numbers in a whole
document.
<p/>To suppress page numbers from a single page, use
<code>\</code><code>thispagestyle{empty}</code> somewhere within the text of the
page.  (Note that <code>\</code><code>maketitle</code> and <code>\</code><code>chapter</code> both use
<code>\</code><code>thispagestyle</code> internally, so you need to call it after you&rsquo;ve
called them.)
<p/>To suppress page numbers from a sequence of pages, you may use
<code>\</code><code>pagestyle{empty}</code> at the start of the sequence, and restore
the original page style at the end.  Unfortunately, you still have to
use <code>\</code><code>thispagestyle</code> after any <code>\</code><code>maketitle</code> or <code>\</code><code>chapter</code>
command.
<p/>In the <i>memoir</i> class, the troublesome commands (<code>\</code><code>maketitle</code>,
<code>\</code><code>chapter</code>, etc.) invoke their own page style
(<code>title</code>, <code>chapter</code>, etc.), which you may
redefine using the class&rsquo;s own techniques to be equivalent to
&ldquo;<code>empty</code>&rdquo;.  The <i>KOMA-script</i> classes have
commands that contain the page style to be used, so one might say:
<blockquote>
<pre>
\renewcommand*{\titlepagestyle}{empty}
</pre>
</blockquote><p>
<p/>An alternative (in all classes) is to use the rather delightful
<code>\</code><code>pagenumbering{gobble}</code>; this has the simple effect that any
attempt to print a page number produces nothing, so there&rsquo;s no issue
about preventing any part of LaTeX from printing the number.
However, the <code>\</code><code>pagenumbering</code> command does have the side effect that
it resets the page number (to 1), which may be undesirable.
<p/>The <i>scrpage2</i> package separates out the representation from
the resetting; so one can say
<blockquote>
<pre>
\renewcommand*{\pagemark}{}
</pre>
</blockquote><p>
to have the same effect as the <code>gobble</code> trick, without
resetting the page number.
<dl>
<dt><tt><i>nopageno</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/carlisle/nopageno.sty">macros/latex/contrib/carlisle/nopageno.sty</a>
<dt><tt><i>KOMA script bundle</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/koma-script.zip">macros/latex/contrib/koma-script</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/koma-script.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/koma-script/">browse</a>)
<dt><tt><i>memoir.cls</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/memoir.zip">macros/latex/contrib/memoir</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/memoir.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/memoir/">browse</a>)
<dt><tt><i>scrpage2.sty</i></tt><dd>Distributed as part of <a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/koma-script.zip">macros/latex/contrib/koma-script</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/koma-script.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/koma-script/">browse</a>)
</dl>
<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=nopageno">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=nopageno</a>
</body>