0

I am following Resume Enumeration across frames

the author has mentioned the use of \suite and \asuivre to enable the resume of enumeration across different frames.

What do \suite and \asuivre commands do?

I have to create an enumeration list that expands four frames. I have been trying \suite and \asuivre but the numbering that I am getting is incorrect.

For example, sometimes I get the sequence {1,2,3,4}{1,2,3,4}{1,2,3,4}{1,2,3,4} In some other combination, I end up getting {1,2,3,4}{5,6,7,8}{1,2,3,4}{5,6,7,8}

In one of the combinations I even got {1,2,3,4}{1,2,3,4}{5,6,7,8}{9,10,11,12}

where {} represent one frame and the number represents the order of the enumeration list

I basically do not know when to write \suite or \asuivre and when to NOT write it. Kindly help

MWiesner
  • 225
Upendra01
  • 170

1 Answers1

1

The \asuivre command saves the current value of the (top level) enumeration counter. \suite sets the same counter to the saved value. So at the end of the first list, save with \asuivre, then start the next list with \suite. Repeat as necessary.

\documentclass{beamer}

\newcounter{sauvegardeenumi}
\newcommand{\asuivre}{\setcounter{sauvegardeenumi}{\theenumi}}
\newcommand{\suite}{\setcounter{enumi}{\thesauvegardeenumi}}

\begin{document}

\begin{frame}
  \begin{enumerate}
  \item One
  \item Two
  \item Three
  \item Four
    \asuivre
  \end{enumerate}
\end{frame}

\begin{frame}
  \begin{enumerate}
    \suite
  \item Five
  \item Six
  \item Seven
  \item Eight
    \asuivre
  \end{enumerate}
\end{frame}

\begin{frame}
  \begin{enumerate}
    \suite
  \item Nine
  \item Ten
  \item Eleven
  \item Twelve
    \asuivre
  \end{enumerate}
\end{frame}

\begin{frame}
  \begin{enumerate}
    \suite
  \item Thirteen
  \item Fourteen
  \item Fifteen
  \item Sixteen
  \end{enumerate}
\end{frame}

\end{document}

Sample output

Andrew Swann
  • 95,762