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:


© 2007–2018 Karl Berry
Public Domain Software