Is there an easy way to vertically center a picture inside an overlayarea
environment?
Here is a MWE of a small animation:
\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{columns}
\column{.45\columnwidth}
\begin{overlayarea}{\columnwidth}{.7\textheight}
\includegraphics<1>[width=\columnwidth,height=.7\textheight,keepaspectratio]{picture1}
\includegraphics<2>[width=\columnwidth,height=.2\textheight,keepaspectratio]{picture2}
\end{overlayarea}
\column{.45\columnwidth}
\begin{itemize}[<+->]
\item Point A
\item Point B
\end{itemize}
\end{columns}
\end{frame}
\end{document}
Picture1 and picture2 will appear on the top of the columns, instead of being vertically centered (in fact, it is the overlayarea
that is vertically centered, and all the picture inside are visibly aligned on its top)
The command \vfill
does not seem to work.
Currently, I can correct the alignment of picture by inserting this kind of code:
\only<2>{\vspace{.25\textheight}}
But this requires manual adjustment…
Best Answer
One possibility is to use a
\parbox
instead ofoverlayarea
:The line
\PassOptionsToPackage{demo}{graphicx}
simply replaces actual figures with black rectangles; do not use that option in your actual document.