It sounds simple: resume the numbering of items in an enumerate environment in LaTeX to have it continue numbering where the previous enumerate left off. This howto describes how to do it.
Assume we have the following code:
\documentclass[a4paper]{article} \begin{document} \section{My items} \begin{enumerate} \item First item \item Second item \end{enumerate} \section {Additional items} \begin{enumerate} \item Third item \item Fourth item \end{enumerate} \end{document}
This translates to the following:
My items
1. First item
2. Second itemAdditional items
1. Third item
2. Fourth item
Which is obviously not what we mean. We could manually reset the numbering using a renewcommand, but this is cumbersome and not very robust when the number of items in the first list is subject to change.
A much more elegant solution is provided by the enumitem package. This modifies the enumerate, itemize and description environments and one of those modifications is the addition of a “resume” option.
The revised code looks like this:
\documentclass[a4paper]{article} \usepackage{enumitem} % load the package \begin{document} \section{My items} \begin{enumerate} \item First item \item Second item \end{enumerate} \section {Additional items} \begin{enumerate}[resume] % tell the enumerate to resume numbering \item Third item \item Fourth item \end{enumerate} \end{document}
This time, the result is as we expected:
My items
1. First item
2. Second itemAdditional items
3. Third item
4. Fourth item
More information can be found in the complete enumitem documentation.
Hey, das handig. Even onthouden.
why have you chosen such a small font for your code? It’s illegible.
Thanks for the info. Just what I needed to know. I was not aware of the enumitem package but it did just what I needed (resume enumeration). In case anyone cares, it is available to Ubuntu or Debian in the texlive-extras package. And surely it is part of the TexLive install on Apple or Windows machines.
Michel,
dank je wel voor deze tip !
Paul.
Thanks!!!! Just what i was looking for!!!
Thanks a lot. Your info has solved my problem.
I did that , but in the next sextion it writes
resume instead of the numbers
like that
1……….
2……….
section 2
resume ……
reusme……..
@Hussam: did you include the enumitem package? It sounds like you didn’t and the default behaviour of enumerate is to use the thing between brackets as the symbol in front of each item :)
One downside to enumitem is that including the package reinterprets ALL your {enumerate}s, and if you’ve given optional arguments like [(i)] to have it count in lower-case roman numerals, then {enumitem} will choke. There is a simpler (more elementary but not as sophisticated) workaround.
Before you start the list, include the line
\newcounter{saveenum}
Then end the first part of your list with
\setcounter{saveenum}{\value{enumi}}
\end{enumerate}
and start the continuation of the list with
\begin{enumerate}
\setcounter{enumi}{\value{saveenum}}
\item
This will restart your numbering where it left off, without having to use any packages or do global search-and-replaces.
Thanks very much. Just what I wanted. I did not know of the enumitem package. This solves my problem very simply.
Could anyone please tell me how to change the enumerate symbols? If I replace them (say by $\blacksquare$, they do not include numbers any more). The standard symbol is a circle with some “spotlight” on it and the latter makes reading the number more difficult.
Very handy, thanks for taking the time to explain!