36

Possible Duplicate:
Resuming a list

What is the best way to extend an enumeration such that the next enumeration environment does not start with one but with the number following the last item from the previous enumeration? (Let's ignore the problem of nested enumerate environments.)

\documentclass{article}

\begin{document}
    \begin{enumerate}
    \item One
    \item Two    
    \end{enumerate}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod. 

    \begin{enumerate}
    \item Three
    \item Four     
    \end{enumerate}
\end{document}

This is a Duplicate

See Resuming a list.

0
33

This solution doesn't use any package:

\documentclass{article}
\begin{document}
  It is possible to save the contents of \texttt{enumi} at the end of an enumeration:
  \begin{enumerate}
    \item This is an item.
    \item This is another item. We will now stop the enumeration.
    \newcounter{enumTemp}
    \setcounter{enumTemp}{\theenumi}
  \end{enumerate}
  \texttt{enumTemp} is now \theenumTemp. We can continue the enumeration like so:
  \begin{enumerate}
    \setcounter{enumi}{\theenumTemp}
    \item The list goes on
    \item and on.
  \end{enumerate}
  You can also put everything into your own macros for convenience. Note that this is a bit hackish, but it works.
\end{document}
3
  • I hat to do \setcounter{enumi}{\value{theenumTemp}} or I would get an Undefined control sequence error. – Rouven B. Aug 20 '16 at 10:39
  • 1
    What is so bad about using additional packages? – Kim Jan 26 '17 at 12:44
  • Adding enumitem messes up a beamer document. It's good to have different solutions. – Henk Metselaar Jun 20 '18 at 8:29
31

Try to uncommment the second section.

\documentclass{article}
\usepackage{enumitem}
\begin{document}
  \section{Hahaha}
    \begin{enumerate}
      \item First 
      \item Second 
    \end{enumerate}
  %\section{Hihihi}
    \begin{enumerate}[resume] % to resume
      \item Third 
      \item Fourth 
    \end{enumerate}
\end{document}

Not the answer you're looking for? Browse other questions tagged or ask your own question.