5

MWE:

\documentclass{beamer}
\begin{document}

\begin{frame}{hello}
\begin{overlayarea}{\textwidth}{1\textheight}
\begin{columns}[onlytextwidth]
    \begin{column}{0.6\textwidth}
        \begin{itemize}
          \item<1-> statement 1
          \item<2-> statement 2
        \end{itemize}
    \end{column}
    \begin{column}{0.4\textwidth}
      \centering
      \includegraphics<1->[width=40mm]{cat.jpg}
      \includegraphics<2->[width=40mm]{ctanlion.png}%
    \end{column}
​  \end{columns}
\end{overlayarea}
\end{frame}

\end{document}

enter image description here enter image description here

In this MWE, the position of the cat is fixed on both slides. But, as soon as I add the lion image, the position of statement 1 and statement 2 shifts down. I would like to fix the position of statement 1 and statement 2 in both the slides. statement 2 doesn't necessarily have to be aligned with the lion image.

1 Answer 1

7

The easiest way to avoid such problems is to use a top aligned frame:

\documentclass{beamer}
\begin{document}

\begin{frame}[t]{hello}
%%\begin{overlayarea}{\textwidth}{1\textheight}
\begin{columns}[onlytextwidth,T]
  \begin{column}{0.6\textwidth}
        \begin{itemize}
          \item<1-> statement 1
          \item<2-> statement 2
        \end{itemize}
    \end{column}
    \begin{column}{0.4\textwidth}
      \centering
      \includegraphics<1->[width=40mm]{example-image-duck}
      \includegraphics<2->[width=40mm]{example-image-duck}%
    \end{column}
  \end{columns}
%%\end{overlayarea}
\end{frame}

\end{document}

enter image description here

Or you could use the overlayarea inside of the second column:

\documentclass{beamer}
\begin{document}

\begin{frame}{hello}
\begin{columns}[onlytextwidth]
  \begin{column}{0.6\textwidth}
        \begin{itemize}
          \item<1-> statement 1
          \item<2-> statement 2
        \end{itemize}
    \end{column}
    \begin{column}{0.4\textwidth}
          \begin{overlayarea}{\textwidth}{142pt}
      \centering%
      \includegraphics<1->[width=40mm]{example-image-duck}
        \includegraphics<2->[width=40mm]{example-image-duck}%
      \end{overlayarea}
    \end{column}
  \end{columns}
\end{frame}

\end{document}

enter image description here

(adjust the value of 142pt to match the combined height of both your images)

I know you said they don't necessarily have to align, but if you would like Statement 2 to be align, then you could use two columns:

\documentclass{beamer}
\begin{document}

\begin{frame}{hello}
\begin{columns}[onlytextwidth]
  \begin{column}{0.6\textwidth}
        \begin{itemize}
          \item statement 1
        \end{itemize}
    \end{column}
    \begin{column}{0.4\textwidth}
      \centering
      \includegraphics[width=40mm]{example-image-duck}
    \end{column}
  \end{columns}
\begin{columns}<2->[onlytextwidth]
  \begin{column}{0.6\textwidth}
        \begin{itemize}
          \item statement 2
        \end{itemize}
    \end{column}
    \begin{column}{0.4\textwidth}
      \centering
      \includegraphics[width=40mm]{example-image-duck}%
    \end{column}
  \end{columns}  
\end{frame}

\end{document}

enter image description here

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .