3

This question already has an answer here:

I want to use resume in my beamer presentation, so I declared using the package enumitem, but I had an error:

! Undefined control sequence. .../enumerate \beameritemnestingprefix

I don't know where the problem is!

\documentclass[11pt]{beamer}
\usetheme{Madrid}
\usepackage{enumitem}
\begin{document}

 \begin{frame}
   \begin{enumerate}
     \item one
     \item two
   \end{enumerate}
  \end{frame}

  \begin{frame}
   \begin{enumerate}[resume*]
     \item three
   \end{enumerate}
 \end{frame}

\end{document}

if I don't use enumitem I receive this when compiling

resume* three

marked as duplicate by user31729, Ruben, Jesse, Andrew, Paul Gaborit Mar 21 '16 at 6:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • i didn't understand this solution . – Hind Dev Mar 13 '16 at 18:00
  • @HindDev: enumitem is not compatible with beamer. So, if you want to "resume" a list that was started before, you'll have to manually set that up... – Werner Mar 13 '16 at 18:40
  • 1
    I think tex.stackexchange.com/a/55001/38080 is much more easy to use – Rmano Mar 13 '16 at 18:42
  • @Werner , thank you , but manually didn't give me the same bullet – Hind Dev Mar 13 '16 at 18:58
  • I tried this before it inserts a duplicate frame I didn't like it – Hind Dev Mar 13 '16 at 19:03
4

enumitem is incompatible with beamer. You can either save the counter and re-use it later in the document, or use a \label-\ref approach for saving and restoring:

\documentclass{beamer}

\usetheme{Madrid}
\usepackage{refcount}

\begin{document}

\begin{frame}
  \begin{enumerate}
    \item one
    \item two
    \label{end-enumerate}% Save counter at end of enumerate
  \end{enumerate}
\end{frame}

\begin{frame}
  \begin{enumerate}
    \setcounterref{enumi}{end-enumerate}
    \item three
  \end{enumerate}
\end{frame}

\end{document}

The above requires you to use a separate for each enumerate list you want to "resume". If you're using this sequentially, then you can automate it to some extent:

\documentclass{beamer}

\usetheme{Madrid}
\usepackage{refcount}

\newcounter{saveenumi}
\newcommand{\saveenumerate}{%
  \stepcounter{saveenumi}%
  \label{saveenumi-\thesaveenumi}}
\newcommand{\restoreenumerate}{%
  \setcounterref{enumi}{saveenumi-\thesaveenumi}}

\begin{document}

\begin{frame}
  \begin{enumerate}
    \item one
    \item two
    \saveenumerate
  \end{enumerate}
\end{frame}

\begin{frame}
  \begin{enumerate}
    \restoreenumerate
    \item three
  \end{enumerate}
\end{frame}

\end{document}

beamer also provides it's own frame-specific overlay specification. In your minimal example, you can use:

\documentclass{beamer}

\usetheme{Madrid}

\begin{document}

\begin{frame}
  \begin{enumerate}
    \item<-2> one
    \item<2> two
    \item<3> three
  \end{enumerate}
\end{frame}

\end{document}
  • thank you very much, it works, I didn't knew that in Latex we can use like a variable memories for saving a thing – Hind Dev Mar 13 '16 at 19:11

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