I'm looking for a method to change the content of an alertbox
in beamer when the user moves to the next frame.
A solution is of course to generate two frames:
\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{alertblock}{Foo}
Bar1
\end{alertblock}
\end{frame}
\begin{frame}
\begin{alertblock}{Foo}
This is a very long text that should be displayed on two or more lines, as a result, the alertblock will enlarge and thus cause the audience to focus more on the box than the content that is of course the important part of the presentation.
\end{alertblock}
\end{frame}
\end{document}
The problem with this approach is however that if Bar2
has not the same vertical span width as Bar1
, the box is repositioned resulting in an ugly visual effect.
As a result in the first slide, an alertblock
is displayed containing Bar1
but already has the size to show This is a very...
, in the second slide This is a very...
is displayed starting at the top-left of the alertblock
.
alertblock
and then include overlay specifications for the contents. As in\begin{alertblock}{Foo} \onslide<1>{Bar1} \par \onslide<2>{Bar2} \end{alertblock}
, say. Perhaps a more concrete example highlighting your problem would help.Bar2
is placed belowBar1
overlayarea
environment to specify the area that should be kept the same. As such, I think the following is a duplicate: Avoiding jumping frames inbeamer