Mixture of \only and \onslide behaviour?

15 views
Skip to first unread message

Lukas Barth

unread,
Apr 19, 2016, 8:58:15 AM4/19/16
to LaTeX Beamer class
Hi everyone,

I'm having two chunks of \items inside an itemize, and I want to replace the first chunk with the second chunk on click. What I currently do is to wrap both chunks in appropriate \only<>s, like this:

\begin{itemize}
 \only<1> {
  \item Foo
  \item Bar
 }
 \only<2> {
  \item I replace Foo
  \item I replace Bar
  \item I am new!
 }
\end{itemize}

Now, since they are of different sizes, this makes the itemize jump around on the slide. What I would need is some grouping of the \only<>s, that reserves spaces for the contents of the largest \only<> inside the group..

Can something like that be achieved?

Thanks a lot,

Lukas

Mark Yagnatinsky

unread,
Apr 20, 2016, 3:03:51 AM4/20/16
to beamer...@googlegroups.com
When I first saw this email, I though to myself, "I know exactly where in the beamer manual to find the answer to this question".  I was about to send an answer along the lines of "see section 9.5", when I decided to double check that things are really as simple as I thought.  Over an hour later, I finally present the following rather simple solution :)

\begin{overprint}

\onslide<1>

\begin{itemize}

\item Foo

\item Bar

\end{itemize}

\onslide<2>

\begin{itemize}

\item I replace Foo

\item I replace Bar

\item I am new!

\end{itemize}

\end{overprint}


Hope this helps.


--
You received this message because you are subscribed to the Google Groups "LaTeX Beamer class" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beamer-class...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages