[Tex/LaTex] Dancing images in beamer

beameroverlaysvertical alignment

When creating a slide using pauses and \only, I am getting cases where the content shifts between slides. I have tried using overlayarea and overprint as described in Avoiding jumping frames in beamer (in every combination I could think of – in one or the other or both columns, around the whole thing, using \only, using \onslide), but I still get dancing images.

Minimal example follows. Note, while debugging I am including the same image 5 times, but in our end document I will be using 5 different images (all the same size). [ Update: The dancing seems to happen on the slide where the visible portion of the itemize environment exceeds the height of the image, so this may depend on the image size ]

\documentclass[t]{beamer}
\usetheme{Singapore}
\usecolortheme{rose}

\begin{document}

\begin{frame}{Riverbend Community Math Center}
\begin{columns}[c]
  \begin{column}{0.6\textwidth}
    \begin{itemize}[<+->]
    \item Founded in Summer of 2006
    \item Centered in St.~Joseph County, Indiana
    \item Independent, non-profit organization
    \item Serves people ages 5 through adult
    \item Promotes interest and confidence in mathematics
    \end{itemize}
  \end{column}

  \begin{column}{0.4\textwidth}
    \only<1>{\includegraphics[width=\textwidth]{RiverbendCommunityMathCenter}}
    \only<2>{\includegraphics[width=\textwidth]{RiverbendCommunityMathCenter}}
    \only<3>{\includegraphics[width=\textwidth]{RiverbendCommunityMathCenter}}
    \only<4>{\includegraphics[width=\textwidth]{RiverbendCommunityMathCenter}}
    \only<5>{\includegraphics[width=\textwidth]{RiverbendCommunityMathCenter}}
  \end{column}
\end{columns}
\end{frame}

\end{document}

For complete information, I am using XeLaTeX but see the same dancing when compiling with plain LaTeX.

Best Answer

This seems to be caused by the center alignment of the two columns (because you use {columns}[c]). I would change that to top alignment ([t]) and add \vspace{0cm} on top of the second column to create a narrow top line to which the first line of the first column is aligned to. This is basically the same solution as for Aligning image and text on top, with minipages and Vertical alignment of tikzpicture with text? just for beamer columns.

\documentclass[t]{beamer}
\usetheme{Singapore}
\usecolortheme{rose}

\begin{document}

\begin{frame}{Riverbend Community Math Center}
\begin{columns}[t]
  \begin{column}{0.6\textwidth}
    \begin{itemize}[<+->]
    \item Founded in Summer of 2006
    \item Centered in St.~Joseph County, Indiana
    \item Independent, non-profit organization
    \item Serves people ages 5 through adult
    \item Promotes interest and confidence in mathematics
    \end{itemize}
  \end{column}

  \begin{column}{0.4\textwidth}
    \vspace{0cm}
    \only<1>{\includegraphics[width=\textwidth]{RiverbendCommunityMathCenter}}
    \only<2>{\includegraphics[width=\textwidth]{RiverbendCommunityMathCenter}}
    \only<3>{\includegraphics[width=\textwidth]{RiverbendCommunityMathCenter}}
    \only<4>{\includegraphics[width=\textwidth]{RiverbendCommunityMathCenter}}
    \only<5>{\includegraphics[width=\textwidth]{RiverbendCommunityMathCenter}}
  \end{column}
\end{columns}
\end{frame}

\end{document}

Note that instead \only<n>{\includegraphics[...]{...}} you can also write \includegraphics<n>[...]{...} which should have the same effect, but is shorter.

Related Question