Resume enumerate numbering in LaTeX

Posted by Michel on at 19:15. permalink

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 item

Additional 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 item

Additional items
3. Third item
4. Fourth item

More information can be found in the complete enumitem documentation.

  • dutch
  • english

3 Responses to Resume enumerate numbering in LaTeX

  1. Hey, das handig. Even onthouden.

  2. andy says:

    why have you chosen such a small font for your code? It’s illegible.

  3. Benjamin Jackson says:

    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.

Leave a Reply

Your email is never published nor shared. Required fields are marked *

*

You may use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>