Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to combine beamer overlays and newenvironments:

\newcounter{scount}
\setcounter{scount}{0}
\newenvironment{sitem}[1]
   {%before
   \def\data{#1}
   \stepcounter{scount}
   \onslide<\value{scount}->{\item \data}
   \comment
   }{
   \endcomment
   }

and:

\begin{itemize}
  \begin{sitem}{data}asdf1\end{sitem}
  \begin{sitem}{data}asdf2\end{sitem}
  \begin{sitem}{data}asdf3\end{sitem}
\end{itemize}

But beamer seems to ignore the \onslide command and shows all data values at once instead of data for asdf1, asdf2, asdf3 after each other.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Perhaps a better way to achieve what you want is as follows:

\begin{itemize}[<+->]
\item Foo
\item Bar
\end{itemize}
share|improve this answer
add comment

I'm not sure if this is the cause of the unexpected behavior, but you can eliminate the extra counter with incremental overlay specifications.

\newenvironment{sitem}[1]
   {%before
     \item<+-> #1
     \comment
   }{
     \endcomment
   }
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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