TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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.