Synopsis:
\usecounter{counter}
Used in the second argument of the list
environment (see list), this declares that list items will be numbered by counter. It initializes counter to zero, and arranges that when \item
is called without its optional argument then counter is incremented by \refstepcounter
, making its value be the current ref
value (see \ref). This command is fragile (see \protect).
Put in the document preamble, this example makes a new list environment enumerated with testcounter:
\newcounter{testcounter} \newenvironment{test}{% \begin{list}{}{% \usecounter{testcounter} } }{% \end{list} }
© 2007–2018 Karl Berry
Public Domain Software
http://latexref.xyz/_005cusecounter.html