Featured Book

LaTeX Beginners Guide

Who is online

In total there are 10 users online :: 0 registered, 0 hidden and 10 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: No registered users and 10 guests

Partner Sites

TeXwelt - Fragen und Antworten goLaTeX
TeXblog
TeXnicCenter
TeXample

Enumeration over several frames [Beamer]

Add tags Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)

Re: Enumeration over several frames [Beamer]

Postby pooz on Sun Aug 1st, 2010

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)
pooz
 
Posts: 65
Joined: Sat Apr 11th, 2009

Re: Enumeration over several frames [Beamer]

Postby localghost on Sun Aug 1st, 2010

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
User avatar
localghost
Site Moderator
 
Posts: 9219
Joined: Fri Feb 2nd, 2007
Location: Braunschweig, Germany

Re: Enumeration over several frames [Beamer]

Postby pooz on Sun Aug 1st, 2010

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 :-(
pooz
 
Posts: 65
Joined: Sat Apr 11th, 2009

Re: Enumeration over several frames [Beamer]

Postby Juanjo on Sun Aug 1st, 2010

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  •  Open in writeLaTeX
\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
}


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  •  Open in writeLaTeX
\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
}

But there is a simple workaround. Just use an additional counter to track the value of the enumi counter:
Code: Select all  •  Open in writeLaTeX
\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
}
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
User avatar
Juanjo
 
Posts: 656
Joined: Sat Jan 27th, 2007

Previous

Return to Text Formatting

Who is online

Users browsing this forum: No registered users and 10 guests