LaTeX forum ⇒ 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

Re: Enumeration over several frames [Beamer]

Postby pooz » Sun Aug 01, 2010 8:36 pm

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)

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Location: Braunschweig, Germany

Postby localghost » Sun Aug 01, 2010 8:50 pm

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.
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses

Link:
BBcode:
HTML:
Hide post links
Show post links

pooz
Posts: 65
Joined: Sat Apr 11, 2009 10:47 am

Postby pooz » Sun Aug 01, 2010 8:56 pm

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 :-(

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
Juanjo
Posts: 656
Joined: Sat Jan 27, 2007 12:46 am

Postby Juanjo » Sun Aug 01, 2010 11:08 pm

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:
  1. \documentclass{beamer}
  2.  
  3. \usepackage{enumitem}
  4. \setenumerate[1]{label=\arabic*.}
  5.  
  6. \begin{document}
  7. \begin{frame}
  8. Test-text begins here.
  9. \begin{enumerate}
  10. \item First item.
  11. \end{enumerate}
  12. \end{frame}
  13. \end{document}


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:
  1. \documentclass{beamer}
  2.  
  3. \usepackage{enumitem}
  4. \setenumerate[1]{label=\arabic*.}
  5.  
  6. \begin{document}
  7. \begin{frame}
  8. Test-text begins here.
  9. \begin{enumerate}
  10. \item First item.
  11. \item Second item.
  12. \end{enumerate}
  13. More text. Let us now resume the enumeration:
  14. \begin{enumerate}[resume]
  15. \item Third item.
  16. \end{enumerate}
  17. \end{frame}
  18. \begin{frame}
  19. \begin{enumerate}[resume]
  20. \item This should be the fourth item.
  21. \end{enumerate}
  22. \end{frame}
  23. \end{document}

But there is a simple workaround. Just use an additional counter to track the value of the enumi counter:
  1. \documentclass{beamer}
  2.  
  3. \usepackage{enumitem}
  4. \setenumerate[1]{label=\arabic*.}
  5. \newcounter{ResumeEnumerate}
  6.  
  7. \begin{document}
  8. \begin{frame}
  9. Test-text begins here.
  10. \begin{enumerate}
  11. \item First item.
  12. \item Second item.
  13. \end{enumerate}
  14. More text. Let us now resume the enumeration:
  15. \begin{enumerate}[resume]
  16. \item Third item.
  17. \end{enumerate}
  18. \setcounter{ResumeEnumerate}{\value{enumi}}
  19. \end{frame}
  20. \begin{frame}
  21. \begin{enumerate}[start=\numexpr\value{ResumeEnumerate}+1]
  22. \item This should be the fourth item.
  23. \end{enumerate}
  24. \end{frame}
  25. \end{document}
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.

Link:
BBcode:
HTML:
Hide post links
Show post links


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 3 guests