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 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.

Another example of manipulating the way counters are used is given in the discussion of numbering in lists. Also see Itemize Environment for a related discussion.

Related topics


Return to LaTeX Table of Contents
Revised by Sheldon Green, agxsg@giss.nasa.gov, 13 Jul 1995.