LaTeX numbering

One advantage of LaTeX over the other TeX-flavors is that it provides an automatic numbering of the sections, theorems, equations etc., together with an easy way to refer to these numbers.

The value of a counter can be changed with a command of the type


One can achive the reseting of the equation counter at the beginning of each section and the inclusion of the section number in the equation numbering with the command


To add a label to any of the items which received a number, use


One can refer anywhere else in the text to it with one of the following:


The meaning is the following:

One can adjust the way items are numbered by re-defining some of the commands (the first example is essentially equivalent to \numberwithin{equation}{section}):


The \newtheorem command defines a new "theorem-like" environment. Its syntax is described below. Two arguments are required (as in the first form), the others are optional.


where: Here is an example of macros that define the way theorems etc. are numbered and presented:


For more on variations of the fonts used, see this part in the Fancy Stuff Section.