0

I am currently learning how to use Beamer and would like to create a frame that presents 3 techniques for reduction of a class of objects (given with itemize). The first technique is the largest among the three and consists of 2 big equations, say Eq1 and Eq2. My desire is to present it with \only<2-4> - in other words, in the first step I wish the name of the technique to appear, then in steps <3-4> to show the two equations, and at step 5 all of these to disappear and to make place for the other information. What I tried is:

\begin{frame}{Techniques}

\begin{itemize}
\only<2-4> {\item Technique 1:
\pause
\begin{equation*} Eq1 \end{equation*}
\pause
\begin{align*} Eq2 \\ Eq2+ \end{align*}
}

\item<5-> Technique 2:
\begin{equation*} Eq 3 \end{equation*}

\item<6-> Technique 3: \pause
\hspace{1em} Algorithm 1 \pause
\hspace{1em} Algorithm 2 \pause
\hspace{1em} Algorithm 3
\end{itemize}

\vfill
\end{frame}

however, this doesn't work. It gives directly the name Technique 1 and Eq1 (at step 2), then Eq2 appears (at step 3) and at the final step 4 nothing happens. Is there a way to fix this?

PS A similar problem appears with Technique 3, where all algorithms appear at once (while I'd like to have them appearing one by one). I suppose though that, if I learn how to fix the above problem, I shall be able to work this one out, too...

1 Answer 1

1

You have to be a little careful in mixing up \pause and <n-m> commands as beamer is not always able to work out what you want. One nice trick is that

\pause[5]

tells beamer that pause should start counting from the slide 5 on-wards. Another nice trick is that many commands, including \item, accept the <n-m> modifiers, which allows you to write things like \item<2-7> to display the following item only on slides 2 to 7.

From what you have written I am not entirely sure that I understand what you want, but I think that this is close:

\documentclass[t]{beamer}
\begin{document}

  \begin{frame}{Techniques}
  \begin{itemize}
    \item<2-5> Technique 1:
    \only<3-5>{
      \begin{equation*} Eq1 \end{equation*}
    }
    \only<4-5>{
      \begin{align*} Eq2 \\
          \only<5>{Eq2+}
      \end{align*}
    }
    \item<6-> Technique 2:
    \begin{equation*} Eq 3 \end{equation*}

    \item<7-> Technique 3:
    \pause[8]% tell pause to start counting from slide 8
    \hspace{1em} Algorithm 1
    \pause
    \hspace{1em} Algorithm 2
    \pause
    \hspace{1em} Algorithm 3
    \end{itemize}
  \end{frame}

\end{document}
1
  • Thank you for the suggestion - \pause[n] solved the problem indeed. Interestingly, this option isn't mentioned in any tutorial that I looked. PS I want Technique 1 with Eq1 and Eq2 to disappear after step/slide 4 and to make place for the rest of the techniques (otherwise, they don't fit on the screen). With your fix, utilised to my original code, everything works perfectly ;)
    – Newbie
    Commented Aug 25, 2015 at 11:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .