6

I would like to display a frame in two steps:

  • first a block title
  • and then a picture underneath.

Here is my code:

\begin{frame}{title}
\begin{block}{blockTitle}<1->
\includegraphics<2->[width=\textwidth]{image.png}
\end{block}
\end{frame}

Unfortunately, this doesn't display things as I would like to. First it displays the block title in the middle of the frame. Then, it moves this block title up to let the image appear in the middle of the frame.

What I would like is first to have the block title appear at its definitive position and second have the picture appear underneath without the block title to move.

Of course, I could add [t] after the \begin{frame} to solve my problem but that would not place the block in the middle of the frame but rather at the top of it.

4

You should specify an "empty complement" for the image that will be displayed on the first frame of the slide. Below I've used \only<1>{\phantom{..}} to insert and keep the space required so the other slide content doesn't move.

enter image description here

\documentclass{beamer}% http://ctan.org/pkg/beamer
\begin{document}
\begin{frame}{title}
  \begin{block}{blockTitle}<1->
    \only<1>{\phantom{\includegraphics[width=\linewidth,height=.3\textheight]{example-image-a}}}%
    \includegraphics<2->[width=\linewidth,height=.3\textheight]{example-image-a}
  \end{block}
\end{frame}
\end{document}

Note the use of % to avoid further "shaking" of content horizontally. See What is the use of percent signs (%) at the end of lines?

7

A simple solution with \uncover:

\documentclass{beamer}

\begin{document}

\begin{frame}
\frametitle{A test frame}
\begin{block}{A block with an image}
\uncover<2>{\includegraphics[width=6cm]{example-image-a}}
\end{block}
\end{frame}

\end{document}

enter image description here

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.