Welcome to the TeXnik web site

Enumerate without Reset
TUG logo

Main page

Index
English FAQ
Documentation
Software
CTAN
Search CTAN:
Main Server

Statistics

 


 


More Books

The counting of an enumerate environment is reset after any other environment. With the following command in LaTeX preamble you get an absolute counting without resetting:
\newcounter{myEnumCounter}
\newcounter{mySaveCounter}
\renewenvironment{enumerate}{%
  \begin{list}{\arabic{myEnumCounter}.}{\usecounter{myEnumCounter}%
  \setcounter{myEnumCounter}{\value{mySaveCounter}}}
  }{%
  \setcounter{mySaveCounter}{\value{myEnumCounter}}\end{list}%
}
\newcommand\myEnumReset{\setcounter{mySaveCounter}{0}}
The old enumerate environment is redefined, so you need no special command to start continuing counting. With the command \myEnumReset you can Reset the couter at any place in the text.

local time: Fri May 22 19:14:22 UTC 2026; file is: 1.2232 days old
contact webmaster _at_ TeXnik.de