beamer icon indicating copy to clipboard operation
beamer copied to clipboard

overprint should have an option for vertical alignment

Open quazgar opened this issue 3 years ago • 2 comments

The overprint environment contents do not know about each other's size, which makes e.g. vertical centering extra tricky. It would be great if there was an option for vertical alignment, similar to the [t], [c], [b] options which already exist for the column(s) environments.

quazgar avatar May 06 '22 08:05 quazgar

Personally, I would use a minipage of fixed height instead of overprint. This is the most powerful tool to get the alignment you want

\documentclass{beamer}

\usepackage{mwe}
\begin{document}
\begin{frame}
  \hrulefill{}
  \begin{columns}
    \begin{column}{0.4\textwidth}
      Some text.
    \end{column}
    \begin{column}{0.55 \textwidth}
      \begin{minipage}[c][.5\textheight]{\linewidth}
        \centering
        \includegraphics<1>[width=.25\linewidth]{image-a.pdf}
        \includegraphics<2>[width=1\linewidth]{image-b.pdf}
      \end{minipage}
    \end{column}
  \end{columns}
  \hrulefill{}
\end{frame}
\end{document}

document

This requires either guessing or measuring the height, but I think this is worth the effort.

samcarter avatar May 06 '22 12:05 samcarter