Hypertext Help with LaTeX
Counters

Everything LaTeX numbers for you has a counter associated with it. The name of the counter is the same as the name of the environment or command that produces the number, except with no \. Below is a list of some of the counters used in LaTeX's standard document styles to control numbering.

 part            paragraph       figure          enumi
 chapter         subparagraph    table           enumii
 section         page            footnote        enumiii
 subsection      equation        mpfootnote      enumiv
 subsubsection

Manipulating the way counters are printed

Counters are printed in LaTeX by using a command generated as "\the" suffixed with the name of the counter. Thus, equation numbers are printed by the \theequation command, and section numbers by the \thesection command. If you want to change the way such numbers are printed, for example, change from arabic to Roman numerals, you need to redefine the appropriate command, using the \renewcommand command.

As an example, to number equations in an appendix as A-1, A-2, ... , use

  \renewcommand{\theequation}{A-\arabic{equation}}
The second argument implies that the text produced by the renewed \theequation command will be "A-" followed by the output from the \arabic{equation} command, which is the value of the equation counter, printed as an arabic number.

In List Environments the format for the item labels is given by commands like \labelitemi and \labelitemii (for the first two levels of the Itemize Environment), and like \labelenumi (for the Enumerate Environment), and these may also be redefined.

There is an example of manipulating such counters in the discussion of the List Environment. See also the discussions in the Itemize Environment and in the Enumerate Environment.

You can force a change in the number produced by any of the counters. For example, if you wanted to produce a single page numbered 13, you could use

  \setcounter{page}{13}
A variety of commands for manipulating counters this way are given below.

Related topics


See also Sectioning
Return to LaTeX Table of Contents
Revised: Sheldon Green, 25 Oct 1995.