3

I'd like to replace some content in beamer columns in overlays, and have it still vertically centered (as by default) and, especially, have other content stay fixed. Test case:

\documentclass{beamer}
\usetheme{Copenhagen}

\begin{document}

\begin{frame}

\begin{columns}

\begin{column}{0.5\textwidth}
%\begin{overlayarea}{\linewidth}{8cm}
\begin{block}{}
\only<1>{Foo}
\only<2>{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ultricies mauris in ligula eleifend tincidunt. Etiam in malesuada neque. Curabitur tempus purus purus.}
\end{block}
%\end{overlayarea}
\end{column}

\begin{column}{0.5\textwidth}
This line shouldn't move
\end{column}

\end{columns}

\end{frame}

\end{document}

I've found some solutions suggesting the use of overlayarea, but that breaks the vertical alignment of the block in the page. Is there another solution (which doesn't involve manually specifying all spacing)?

2

You could use a minipage to fix vertical alignment with overlayarea

\documentclass{beamer}
\usetheme{Copenhagen}


\begin{document}

\begin{frame}

\begin{columns}

\begin{column}{0.5\textwidth}
\begin{overlayarea}{\linewidth}{8cm}
\begin{minipage}[c][.85\textheight]{\linewidth}
\begin{block}{}
\only<1>{Foo}
\only<2>{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ultricies mauris in ligula eleifend tincidunt. Etiam in malesuada neque. Curabitur tempus purus purus.}
\end{block}
\end{minipage}
\end{overlayarea}
\end{column}

\begin{column}{0.5\textwidth}
\begin{minipage}[c][.85\textheight]{\linewidth}
This line shouldn't move
\end{minipage}
\end{column}

\end{columns}

\end{frame}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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