18.2 \pagenumbering

Synopsis:

\pagenumbering{number-style}

Specifies the style of page numbers, and resets the page number. The numbering style is reflected on the page, and also in the table of contents and other page references. This declaration has global scope so its effect is not stopped by an end of group such as a closing brace or an end of environment.

By default, LaTeX numbers pages starting at 1, using Arabic numerals.

The argument number-style is one of the following (see also \alph \Alph \arabic \roman \Roman \fnsymbol: Printing counters).

arabic

Arabic numerals: 1, 2, …

roman

lowercase Roman numerals: i, ii, …

Roman

uppercase Roman numerals: I, II, …

alph

lowercase letters: a, b, … If you have more than 26 pages then you get ‘LaTeX Error: Counter too large’.

Alph

uppercase letters: A, B, … If you have more than 26 pages then you get ‘LaTeX Error: Counter too large’.

gobble

no page number is output, though the number is still reset. References to that page also are blank.

This setting does not work with the popular package hyperref, so to omit page numbers you may want to instead use \pagestyle{empty} or \thispagestyle{empty}.

If you want to typeset the page number in some other way, or change where the page number appears on the page, see \pagestyle (in short: use the fancyhdr package). The list above of LaTeX’s built-in numbering styles cannot be extended.

Traditionally, if a document has front matter—preface, table of contents, etc.—then it is numbered with lowercase Roman numerals. The main matter of a document uses arabic. LaTeX implements this, by providing explicit commands for the different parts (see \frontmatter, \mainmatter, \backmatter).

As an explicit example, before the ‘Main’ section the pages are numbered ‘a’, etc. Starting on the page containing the \pagenumbering call in that section, the pages are numbered ‘1’, etc.

\begin{document}\pagenumbering{alph}
  ...
\section{Main}\pagenumbering{arabic}
  ...

If you want to change the value of the page number, then you manipulate the page counter (see Counters).


Unofficial LaTeX2e reference manual