[Tex/LaTex] Same figure & changing text as “arrowing” through the presentation (Beamer)

beamer

I tried to build my first presentation and met my first problem: I would like to know how to create a part of my presentation that looks like the example below. Instead of writing 3 frames, I would lite to write 1 frame which contains a figure and some text beneath it; and I would like the text to change as I 'arrow' through the presentation, because that makes it easier to explain a figure. Otherwise, I would be forced to change the "pages" all the time back and forth. What would be annoying for my audiance.

\documentclass{beamer}
\usepackage{graphicx}

\begin{document}

\begin{frame}
\frametitle{Example}
\begin{figure}
\includegraphics[width=1\textwidth]{Figure}
  \caption{Caption}
\end{figure}
bla    1
\end{frame}



\begin{frame}
\frametitle{Example}
\begin{figure}
\includegraphics[width=1\textwidth]{Figure}
  \caption{Caption}
\end{figure}
bla 2
\end{frame}

\begin{frame}
\frametitle{Example}
\begin{figure}
\includegraphics[width=1\textwidth]{Figure}
  \caption{Caption}
\end{figure}
bla 3
\end{frame}

\end{document}

So in this example the figure stays the same, but the text (underneath) changes. Does anyone know how to get that result?

Best Answer

I must admit that I'm not totally sure that I understand what you want, but if I do then I would do (something like) the following:

\documentclass{beamer}
\usepackage{graphicx}

\begin{document}

\begin{frame}
\frametitle{Example}
\begin{center}
\includegraphics[width=1\textwidth]{Figure}

Caption
\end{center}
\begin{overprint}
\onslide<+|handout:0>
bla    1
\onslide<+|handout:0>
bla 2
\onslide<+-|handout:0>
bla 3
\end{overprint}
\end{frame}

\end{document}

Note that I've changed the figure environment to just a plain center: you probably don't want your figure floating around the page. This also meant changing the \caption to just the caption.

The overprint environment is a bit like an itemize environment in that its contents get divided up. In this case, by the \onslide commands. Each of those specifies some content to be put on a particular slide (the stuff between the successive \onslide commands). The overprint environment ensures that it takes up the same amount of space on each slide, which makes it so that there's no danger of the picture "jumping" between slide transitions (as can sometimes happen if stuff takes up different amounts of vertical space on the slides).

For more on beamer and how to handle successive slides, I heartily recommend reading the user guide. If there's stuff in the above that you don't understand, I can happily point you to the relevant part of the guide. For example, the overprint environment is explained in section 9.5 of the manual. If things like \onslide are new to you then I suggest you start with the "tutorial" section at the start of the manual to see what is possible. (And, of course, ask questions here.)