Numbering

Each of these objects are numbered in LaTeX with a counter:
part		paragraph	figure		enumi
chapter		subparagraph	table		enumii
section		page		footnote	enumiii
subsection	equation	mpfootnote	enumiv
subsubsection
The code word that prints the current value of the counter in your document is \thecounter. That is, \thepart, \thechapter, \thesection and so on.

The appearance of these counters, and your own counters, can be changed:

[Table of Contents]

Changing the Numbering Style

You can change the way the number is printed. Quoting from Lamport (p.92), if the page counter has value 4, then you have these choices: To change the numbering style, even half way through your document, you simply \renew it:
\renewcommand{\thefigure}{\thechapter.\arabic{figure}}
                                     ^notice the period here!
This gives Figure numbers
1.1, 1.2 ... 1.4,
2.5, 2.6 ... 2.11,
3.12,...
But that might not be so great, right? Wouldn't it be better to have
1.1, 1.2 ... 1.4,
2.1, 2.2 ... 
with the deeper counter reset to 1 in each chapter? That, in fact, is all you do. You can redefine the way you start a new chapter in the preamble:
\newcommand{\Chapter}[1]{\chapter{#1} \setcounter{figure}{1}}
and then start new chapters with \Chapter{foo}. Or you can just do it by hand at the beginning of each chapter:
%
% Beginning of Chapter 2
%
\chapter{Blah blah}
\setcounter{figure}{1}
Within the \renewcommand{\thefigure}{...} command, you can add whatever you want. To get your pages call "Page 1", "Page 2",... you'd put
\renewcommand{\thefigure}{Page\ \thepage}

Using your own counter

If you're looking for a trick that will change the equation numbering style mid-way through your document to something like this: (1), (2), (3), (4a), (4b), (4c), (5), (6),...then have a look at using subequations. It's probably what you're here for.

On the other hand, maybe you actually want to create your own counter. Why would you want to do this? I hacked this up, like so many have, before I discovered subequations, so I could have Figures numbered 1, 2, 3, 4a, 4b, 4c, 4d, 5, 6, 7 ... where a deeper level was turned on and off as I needed it. Warning: this isn't pretty and there's probably a better way to do it with the [within] option, but I couldn't get it to work. In any case, the following works.

The point is, you want to create a new counter, sort of a subfigure counter, and it has to go a, b, c ... In the preamble, include the line

\newcounter{subfigure}
In the body of the text where you want to turn on the 4a, 4b... put
\renewcommand{\thefigure}{\arabic{figure}\alph{subfigure}}
\setcounter{subfig}{1}
which redefines the way LaTeX writes the Figure counter, and sets the sub-level to 1. The first of the set of Figures, 4a say, is easy:
%
% First Figure in set
%
\setcounter{subfig}{1}
\begin{figure}
...
But of course this steps figure by one, so that we'd get 5.a next time. Uh-oh. For the second Figure in the set, you have to reset the figure counter and add 1 to the subfigure
%
% Second Figure in set
%
\addtocounter{figure}{-1}
\addtocounter{subfig}{1}
\begin{figure}
...
When you want to stop this deeper counting and get back to Figure 5, Figure 6... just redefine the figure counter again:
%
% Back to regular Figure numbering...
%
\renewcommand{\thefigure}{\arabic{figure}}
If someone has sorted out how \newcounter{new_counter}[within] works, send some e-mail...


[Table of Contents] [Top of Numbering]
Peter Newbury e-mail: newbury@math.ubc.ca
Last update: Added subequations 11 October 1996