Text FormattingEnumeration over several frames [Beamer]

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
pooz
Posts: 65
Joined: Sat Apr 11, 2009 10:47 am

Enumeration over several frames [Beamer]

Post by pooz »

localghost wrote:I didn't talk about the »equation« counter. This is kept untouched and should be incremented as usual.
Sorry, I misspelled. Of course I meant the enumeration-counter, which I have to unconfortably set manually to a new value by typing e.g.: \setcounter{enumi}{4}

localghost wrote:The concerned counter is called »labelenumi« (where the small »i« stands for theenumeration level in roman numbers, here the first).
I dont understand, how to use labelenumi and what you are meaning with this solution approach? (the small i is no problem)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Enumeration over several frames [Beamer]

Post by localghost »

pooz wrote:[...] I dont understand, how to use labelenumi and what you are meaning with this solution approach? (the small i is no problem)
My fault. I mixed things up. The counter is of course »enumi«. \labelenumi is a command that formats the item label.

Setting the counter manually is the only solution I see at the moment. But you are free to ask the author of enumitem for advice and report new insights here.
pooz
Posts: 65
Joined: Sat Apr 11, 2009 10:47 am

Enumeration over several frames [Beamer]

Post by pooz »

Ok, thanks.
So, the conclusion is, if you want to have enumeration over several frames (in beamerclass)
  • you can´t use enumitem-package, because it causes some problems with beamerclass.
  • The allowframebreaks,allowdisplaybreaks options causes problems with formulars.
  • So the result is, I have to manually set the counter. This is very ugly, because when adding/removing an item at an arbitrary place, you have to correct the counter again :-(
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Enumeration over several frames [Beamer]

Post by Juanjo »

pooz wrote: you can´t use enumitem-package, because it causes some problems with beamerclass.
No. You can still use enumitem, but it seems that labels must be explicitely redefined. To this end, enumitem provides several options. For example, the problematic MWE that you posted before can be sorted out as follows:

Code: Select all

Code, edit and compile here:
\documentclass{beamer}
\usepackage{enumitem}
\setenumerate[1]{label=\arabic*.}
\begin{document}
\begin{frame}
Test-text begins here.
\begin{enumerate}
\item First item.
\end{enumerate}
\end{frame}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
pooz wrote: So the result is, I have to manually set the counter. This is very ugly, because when adding/removing an item at an arbitrary place, you have to correct the counter again
Once solved the problem with enumitem, one may think in the resume option this package provides. Unfortunately, it seems to work inside the same frame, but not in two different frames. Check this:

Code: Select all

Code, edit and compile here:
\documentclass{beamer}
\usepackage{enumitem}
\setenumerate[1]{label=\arabic*.}
\begin{document}
\begin{frame}
Test-text begins here.
\begin{enumerate}
\item First item.
\item Second item.
\end{enumerate}
More text. Let us now resume the enumeration:
\begin{enumerate}[resume]
\item Third item.
\end{enumerate}
\end{frame}
\begin{frame}
\begin{enumerate}[resume]
\item This should be the fourth item.
\end{enumerate}
\end{frame}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
But there is a simple workaround. Just use an additional counter to track the value of the enumi counter:

Code: Select all

Code, edit and compile here:
\documentclass{beamer}
\usepackage{enumitem}
\setenumerate[1]{label=\arabic*.}
\newcounter{ResumeEnumerate}
\begin{document}
\begin{frame}
Test-text begins here.
\begin{enumerate}
\item First item.
\item Second item.
\end{enumerate}
More text. Let us now resume the enumeration:
\begin{enumerate}[resume]
\item Third item.
\end{enumerate}
\setcounter{ResumeEnumerate}{\value{enumi}}
\end{frame}
\begin{frame}
\begin{enumerate}[start=\numexpr\value{ResumeEnumerate}+1]
\item This should be the fourth item.
\end{enumerate}
\end{frame}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
Post Reply