5

I have a frame with the two columns, one for an image, and one for itemized text. For example,

\frame{\frametitle{hello} 

\begin{columns}[onlytextwidth]
    \begin{column}{0.4\textwidth}
      \centering
      \includegraphics[width=40mm]{pic1.png}
    \end{column}

    \begin{column}{0.6\textwidth}
    \begin{itemize}
      \item statement 1
      \item statement 2
    \end{itemize}
    \end{itemize}
    \end{column}
​  \end{columns}


}

I want to specify an overlay, such that pic1 appears along with statement 1 and pic2 appears with statement 2. How do could I do this?

yayu
  • 5,237

1 Answers1

5

Using the fact that both \includegraphics and \item are overlay-aware, you can do somthing like this:

\documentclass{beamer}

\begin{document}

\frame{\frametitle{hello} 
\begin{columns}[onlytextwidth]
    \begin{column}{0.4\textwidth}
      \centering
      \includegraphics<1>[width=40mm]{cat}
      \includegraphics<2>[width=40mm]{ctanlion}
    \end{column}

    \begin{column}{0.6\textwidth}
    \begin{itemize}
      \item<1> statement 1
      \item<2> statement 2
    \end{itemize}
    \end{column}
​  \end{columns}
}
\end{document}

enter image description here

CTAN lion drawing by Duane Bibby.

Gonzalo Medina
  • 505,128
  • Excellent minimum working example. All I had to do was save the cat and ctanlion as actual graphic files and it got me over the rut I was stuck in for minutes. Thanks – Pablo Adames Apr 24 '22 at 19:24
  • Hey @Gonzalo, I am trying to do something similar where the text is already present and I am adding the picture in the \onslide<2-> {}. But this changes the vertical alignment of the text. I can share an MWE but I am not sure if a similar question exists. Can you point me in the right direction? – Dhruv Thakkar May 30 '22 at 18:11