6

I'm trying to combine graphics and blocks on a slide. Here is my code, i think it's quite simple to figure out what i want from it :

\begin{frame}
\frametitle{Outils}

\onslide<1->\begin{block}{Méthode de correction}
    \begin{itemize}
    \onslide<2->\item Mise à jour par simulation continue
    \onslide<5->\item Assimilation naïve des sorties (post-traitement)      
\end{itemize}
\end{block}

\begin{overprint}
\centerline{\includegraphics<3>[scale=0.4]{./plots/assim1_a.jpg}}
\centerline{\includegraphics<4>[scale=0.4]{./plots/assim1_b.jpg}}
\centerline{\includegraphics<6>[scale=0.4]{./plots/assim2.jpg}}
\end{overprint}

\onslide<7->\begin{block}{Scores}
\begin{itemize}
    \item<8-> CRPS et MAE
    \item<9-> Diagramme de Talagrand
    \item<11-> Diagramme de fiabilité
\end{itemize}
\end{block}
\begin{overprint}
\centerline{\includegraphics<10>[scale=0.29]{./plots/demo_tal.pdf}}
\centerline{\includegraphics<10>[scale=0.29]{./plots/demo_fiab.pdf}}
\end{overprint}
\end{frame}     

So what i try to do is to make a block which parts come up progressively, and sometimes to display a picture corresponding to one of the item in the block. The picture must be displayed right after the block. To make short, pictures must overlay each other while the blocks stay. Moreover, i want the second block (called "Scores"), to be situated right after the second block to take the position of the previous pictures. Is it clear ?

Many thanks to the people who'll think about it !

  • Welcome to TeX.SX! In the future, please try to add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Herr K. Nov 28 '13 at 19:12
10

In this case I would recommend using the onlyenv environment, which is the same as \only. Moreover, use the [t] option to top align the contents to prevent "wobbling".

Code

\documentclass{beamer}
\usetheme{Madrid}
\usepackage{mwe} % provides images used in this example
\begin{document}

\begin{frame}[t]
\frametitle{Outils}

\begin{block}<1->{Méthode de correction}
  \begin{itemize}
    \item<2-> Mise à jour par simulation continue
    \item<5-> Assimilation naïve des sorties (post-traitement)      
  \end{itemize}
\end{block}

\begin{onlyenv}<3-6>
  \begin{center}
    \includegraphics<3>[scale=0.4]{image-a}
    \includegraphics<4>[scale=0.4]{image-b}
    \includegraphics<6>[scale=0.4]{image-c}
  \end{center}
\end{onlyenv}

\begin{onlyenv}<7->
  \begin{block}<7->{Scores}
    \begin{itemize}
      \item<8-> CRPS et MAE
      \item<9-> Diagramme de Talagrand
      \item<11-> Diagramme de fiabilité
    \end{itemize}
  \end{block}
\end{onlyenv}
\begin{center}
  \includegraphics<10>[scale=0.2]{image-a}
  \includegraphics<10>[scale=0.2]{image-b}
\end{center}
\end{frame}     
\end{document}

Output

enter image description here

  • There is still some "wobbling" because of the size of my last pictures i guess, but otherwise it answers perfectly to what i asked for. – thecrazydonut Nov 28 '13 at 19:45

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.