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?

  • Use \visible<...>{...} instead of \onslide<...>{...}. – Paul Gaborit Dec 2 '14 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 '14 at 12:50
  • Sorry: I thought it was the expected result... – Paul Gaborit Dec 2 '14 at 13:54
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}
  • 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 '14 at 13:31
  • You are welcome. By the way, the first caption was incorrect, but I updated now. Thanks. – Jesse Dec 2 '14 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.