1

I wish to include an .gif animation in my latex beamer presentation. Based on my reading from various sources, including this website, what I understood was that I need to convert .gif into a series of .jpg images. I have converted .gif into 10 .jpg images titled from foo-1.jpg to foo-10.jpg. I have put all these images in the same folder where I have my template file and other images which are used subsequently. Next, I am using the below commands to include it as an animation

\begin{frame}    
\animategraphics{12}{foo-}{0}{10}
\end{frame}

On doing this, I get no error, but the slide is shown as given in the attached image. enter image description here

As it can be clearly seen, the animation does not fit on the slide, nor is it showing a set of moving images like a .gif file. What shall I do to get the animation nicely on the slide. I am ready to share all the 10 images if needed as a MWE, but please help me to overcome this problem.

ShJ
  • 891

1 Answers1

2

The answer to the problem has been borrowed from the comment of @samcarter. The correct latex code used is as follows

\begin{frame}[t]
\animategraphics[loop,controls,width=8.5cm]{12}{foo-}{0}{20}
\end{frame}

Using the above code, the screenshot of the solution slide is given as follows: enter image description here

As it can be seen, it is possible to play, pause and some other options are also there, which makes it look better in a presentation

ShJ
  • 891
  • 2
    It would look even better if you used a LaTeX-based plotting/graphing package such as pgfplots together with animate. As @marmot suggests, you will get high quality vector graphics which can be animated by animating a parameter. – AlexG May 02 '18 at 20:03
  • @AlexG I don't know aboutpgfplotspackage. If possible, please post an answer on how it can be done – ShJ May 03 '18 at 01:19
  • 1
    Look for tagged questions, entering [animate] [pgfplots] in the search bar. – AlexG May 03 '18 at 04:53