1

I want images on the lower part of the slide to appear concurrently with the corresponding items in the itemize environment.

The working example below does this; however, the first image is centered on the first slide, but then changes place when the second image is in the slide. I want the image to stay where it is for the whole sequence of slides in the frame.

\begin{frame}
  \frametitle{Foo}
  Some sentence:
  \begin{itemize}
  \item<1,2,3> 
    Text1
  \item<2,3>
    Text2   
  \item<3>
    Text3
  \end{itemize}
  \centering
    \begin{figure}
      \begin{subfigure}{0.4\linewidth}
        \includegraphics<1,2,3>[width=0.7\linewidth]{img1.png}%
      \end{subfigure}
      \begin{subfigure}{0.25\linewidth}
        \includegraphics<2,3>[width=0.7\linewidth]{img2.png}%
      \end{subfigure}
      \begin{subfigure}{0.3\linewidth}
        \includegraphics<3>[width=0.7\linewidth]{img3.png}%
      \end{subfigure}
    \end{figure}
\end{frame}

How to accomplish this?

1

Welcome! You can work with \uncover. As I do not have your images, I replaced them with some generic graphics that comes with most of the installations.

\documentclass{beamer}
\usepackage{subcaption}

\begin{document}
\begin{frame}
  \frametitle{Foo}
  Some sentence:
  \begin{itemize}
  \item<1,2,3> 
    Text1
  \item<2,3>
    Text2   
  \item<3>
    Text3
  \end{itemize}
  \centering
    \begin{figure}
      \begin{subfigure}{0.4\linewidth}
       \uncover<1,2,3>{\includegraphics[width=0.7\linewidth]{example-image-a.png}}%
      \end{subfigure}
      \begin{subfigure}{0.25\linewidth}
       \uncover<2,3>{\includegraphics[width=0.7\linewidth]{example-image-b.png}}%
      \end{subfigure}
      \begin{subfigure}{0.3\linewidth}
       \uncover<3>{\includegraphics[width=0.7\linewidth]{example-image-c.png}}%
      \end{subfigure}
    \end{figure}
\end{frame}
\end{document}

enter image description here

Of course one can apply the usual tricks to make the code shorter.

\documentclass{beamer}
\usepackage{subcaption}

\begin{document}
\begin{frame}
  \frametitle{Foo}
  Some sentence:
  \begin{itemize}[<+->]
  \item
    Text1
  \item
    Text2   
  \item
    Text3
  \end{itemize}
  \centering
    \begin{figure}
      \begin{subfigure}{0.4\linewidth}
       \includegraphics[width=0.7\linewidth]{example-image-a.png}%
      \end{subfigure}
      \begin{subfigure}{0.25\linewidth}
       \uncover<2->{\includegraphics[width=0.7\linewidth]{example-image-b.png}}%
      \end{subfigure}
      \begin{subfigure}{0.3\linewidth}
       \uncover<3>{\includegraphics[width=0.7\linewidth]{example-image-c.png}}%
      \end{subfigure}
    \end{figure}
\end{frame}
\end{document}

Strictly speaking you do not need the subcaption package either.

| improve this answer | |
  • 1
    Thank you for this "example-image-a.png" thing! I didn't know how to give MWE with images. How did you create the animation? – Daniel Paleka Jun 2 at 20:57
  • (Will wait 24h before accepting, in the case someone has something else to add.) – Daniel Paleka Jun 2 at 20:59
  • I'm curious to know that too :-) – Sebastiano Jun 2 at 21:05

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.