2

I see there are several questions about inserting animations into tex beamers. I have tried several of the suggested methods, but always get the same output: a png per slide instead of one slide with an animation.

\documentclass{beamer}
\usepackage{animate}
\usepackage{xmpmulti}
\usepackage{tikz}
\begin{document}

\begin{frame}{Embedded Animation}
    \transduration<0-8>{0}
    \multiinclude[<+->][format=png, graphics={width=\textwidth}] {pres_plots/images/flumap}
\end{frame}

\begin{frame}
 \begin{center}
  \begin{tikzpicture}
   \foreach \Value in {1,2,3,4,5,6,7,8}
    \node<\Value> (pres_plots/images/flumap-\Value){\includegraphics[width=.5\linewidth]{pres_plots/images/flumap-\Value}};
   \end{tikzpicture}
 \end{center}
\end{frame}

\begin{frame}
 \begin{center}
    \includegraphics<1>[width=.5\linewidth]{pres_plots/images/flumap-0}
    \includegraphics<2>[width=.5\linewidth]{pres_plots/images/flumap-1}
    \includegraphics<3>[width=.5\linewidth]{pres_plots/images/flumap-2}
 \end{center}
\end{frame}

\end{document}

Any suggestions?

ke.re
  • 91
  • 1
  • 1
  • 5

1 Answers1

1

The first example you show is a perfectly fine animation. To view it open it in a suitable pdf viewer (e.g. adobe reader) in presentation view. It will automatically play the 8 slides within the frame. The key element to this example is

\transduration<0-8>{0}

which means, that the first 8 slides in this frame will be automatically played for a duration of 0 seconds -- which translates into a finite amount of time the pdf viewer needs to change the slides.

Using this line, you can animate your other two examples in the same way.


If you don't like this multiples slides per frame concept, there is also the animate package which uses JavaScript (check if your pdfviewer has this) to show the animations within a single slide. See https://tex.stackexchange.com/a/117556/36296 for a short example.


Please consider: if the pdf viewer does not support the method you choose (for example if you present from a foreign computer) you can still manually step through the slides in the first case, but with the javascript solution you just won't see anything.