4

Small description of what I want: in a beamerclass frame I have two items (bulletitems?) on the left side and on the right side I have two pictures. When the first item is shown I want the first picture to be displayed. On the next slide, when the second item will appear I want the first item to stay but replace the first picture with the second picture on the right side completly.

This is what I came up with:

\begin{frame}
    \begin{columns}
        \column{.6\textwidth}
        \begin{itemize}[<+->]
            \item<1,2> Some Text explaining the first picture
            \item<2> Text explaining second picture
        \end{itemize}
        \column{.4\textwidth}
        \onslide<1> \begin{figure}[htbp]
                        \centering
                        first picture
                        \caption{fstpic}
                    \end{figure}
        \onslide<2> \begin{figure}[htbp]
                        \centering
                        second picture
                        \caption{sndpic}
                    \end{figure}
    \end{columns}
\end{frame}

I tryed the same with a second itemize environment (replacing \onslide) but I have the same problem:

The pictues on the right side are not centered vertically. The first picture is would be shown on the top of the frame and the second below that (even if the fist picture would be gone).

Is there a simple way to do that?

3
  • Use \visible<...>{...} instead of \onslide<...>{...}. Dec 2, 2014 at 12:48
  • @PaulGaborit, unfortunatly the outcome is the same. the first picture is at the top alligned with the first item and the second picture with the second item.
    – ap0
    Dec 2, 2014 at 12:50
  • Sorry: I thought it was the expected result... Dec 2, 2014 at 13:54

1 Answer 1

5

Use \only.

enter image description here enter image description here

Code

\documentclass[]{beamer}

\begin{document}
\begin{frame}
    \begin{columns}
        \column{.6\textwidth}
        \begin{itemize}[<+->]
            \item<1,2> Some Text explaining the first picture
           \item<2> Text explaining second picture
        \end{itemize}
        \column{.4\textwidth}
        \centering
\only<1>{\begin{figure}[!htbp]
\includegraphics[scale=.23]{example-image-a}
\caption{fstdpic}
\end{figure}
}
\only<2>{\begin{figure}[!htbp]
\includegraphics[scale=.23]{example-image-b}
\caption{sndpic}
\end{figure}
}
\end{columns}
\end{frame}

\end{document}
2
  • Just as I received your answer I found out about \only and wanted to try it. But Now I know that it is what I am looking for. Thank You!
    – ap0
    Dec 2, 2014 at 13:31
  • You are welcome. By the way, the first caption was incorrect, but I updated now. Thanks.
    – Jesse
    Dec 2, 2014 at 13:33

You must log in to answer this question.

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