The following is a summary of counter usage and manipulations available in LaTex.
The following commands have a counter associated with it:
- part
- chapter
- section
- subsection
- subsubsection
- paragraph
- subparagraph
- page
- equation
- figure
- table
- footnote
- mpfootnote
- enumi
- enumii
- enumiii
- enumiv
You have several possibilities to manipulate counters in LaTex:
\addtocounter {counter} {value}
increments the specified counter by the value.\newcounter {newcounter} [oldcounter]
defines a new counter. Option ‘oldcounter’ is to link ‘newcounter’ to ‘oldcounter’.\setcounter {counter} {value}
sets the counter to have the specified value.\usecounter{counter}
used as the second argument of the list environment to number list items (see list command).\value {counter}
produces the value of the counter and is useful for doing arithmetic with counters.\renewcommand {cmd} [args] [opt] {def}
general command to define/redefine new commands.
Counter values can be printed in different formats such as:
\alph
or\Alph {counter}
for letters (a…z or A…Z) .\arabic {counter}
for arabic numbers (1…9).\fnsymbol {counter}
printing various symbols: asterisk, dagger, double dagger, section mark, paragraph mark, double vertical lines, double asterisk, double daggers, double double daggers. The value of counters must be between 1 and 9.\roman
or\Roman {counter}
for roman numerals (I,II,III,IV,V,…,X,etc.)