2

I have a speech to present and would like to produce animations that I can put into my Beamer presentation (or gifs, but it seems that gifs aren't compatible in beamer). I realise this question has been asked multiple times, specifically here, here and here, and I apologise for asking the question again, but nothing is working for me. I have 2000 .png images stored in the same folder as my beamer presentation tex and pdf file. In my texworks file, it is set to pdflatex. I tried using the animate package

\documentclass[11pt,A4paper]{beamer}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{float}
\usepackage{animate}

\begin{document}

\begin{frame}
\begin{center}
\animategraphics[autoplay,loop]{50}{myplot}{1}{200}
\end{center}
\end{frame}
\end{document}

but this just gives me a stationary picture that doesn't even fit in the slide. So what I'm asking is

  1. How do I get the animate function to work? I really need to have all 2000 slides run consecutively and quickly. I need to do this for a couple of problems and only have half an hour for my talk.
  2. How do I resize the image so that it fits on the slide?

Thankyou in advance.

  • What PDF reader are you using? In my experience, the only PDF reader that handles animations properly is Adobe Reader. – darthbith Sep 16 '15 at 14:15
  • @darthbith Sorry, I'm a total novice at this, I don't know what you mean by PDF reader? I have Adobe Audition on my computer if that is what you mean? When I compile my beamer presentation in LaTex with the above code, it opens up a new window which is a pdf file (which has file name "Presentation.pdf - TeXworks" at the top, this pdf file has all my slides on it). – Mattos Sep 16 '15 at 14:30
  • @Mattos Adobe Audition is audio editing software, not very useful for us here... a PDF reader is any application that can open a PDF file and show the contents. Adobe, being the originator of the PDF standard, have the "canonical" PDF reader, and it is the only one that I know of that is able to display animations, movies, etc. You can download Adobe Reader here and install it, if it is not already installed. Keep in mind that you will 1) need to open the file separately after it is compiled and 2) close Adobe Reader before you compile the file again – darthbith Sep 16 '15 at 14:36
  • @darthbith Sorry, I meant I have Audobe Acrobat Reader installed, not Adobe Audition. – Mattos Sep 16 '15 at 14:42
  • 1
    @darthbith It's working now, thankyou for your help, much appreciated. – Mattos Sep 16 '15 at 15:01
3

(1)

\animategraphics[autoplay,loop]{50}{myplot}{1}{200}

Are the files contiguously numbered and named as myplot1.png, myplot2.png, ..., myplot200.png?

50 fps is far too much. Standard video formats have something between 25 and 30. Besides, Adobe Reader may not achieve this rate after all.

Thus:

\animategraphics[autoplay,loop,every=2]{25}{myplot}{1}{200}

(2) Resize the animation using the scale or width option. Put, e.g.,

\noindent\animategraphics[autoplay,loop,every=2,width=\linewidth]{25}{myplot}{1}{200}

with one empty line before and one after on a line of its own.

Or resample the images to a lower resolution using an external programme in order to make them fit without scaling. This may improve animation performance (achievable frame rate).


Most importantly: Use Adobe Reader for viewing and presenting.

  • 1
    Thankyou for the swift answer. The plot is now totally within the slide, and my soliton solution looks epic! Thanks for your help. – Mattos Sep 16 '15 at 15:00
  • This can only handle one gif per slide. If I add more (I tried three) they are all static frames when viewed in Adobe Reader. But I can work with that. Thanks! – Mageek Oct 26 '17 at 17:47
  • That's weird. No problem here. See ↗example on ShareLaTeX. – AlexG Oct 26 '17 at 20:19

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.