I am giving a presentation and I have included an animatedgraphic in the following way:


As you can see, this is played automatically. But I want to have it in the following way:

I use a presentation tool, where I can click on "next slide" and "previous slide". So this tool is just imitating the left cursor and right cursor you would normally use to click to the next / previous slide. How can I tell LaTex to play the animation, when I click on "next slide". Is this possible using a presenter?


Ignore the presenter, a solution for the right cursor is ok!

  • I am still searching for an answer to this question, so any help would be appreciated! Thanks! – Jen Bohold Aug 7 '13 at 10:37
  • Unfortunately this looks like more of a Javascript problem than TeX. So maybe only the author himself can answer. – percusse Aug 8 '13 at 8:27



into the frame body.

Complete example using multipage PDF from pkg mwe as animation frames:




\dots started on ``next slide'':\\[2ex]



An easy way to avoid code duplication is described in this workaround:

  • variable \myframe defines the number of frames composing the animation
  • overlay command \only overwrites the value of \myframe depending on which (beamer) frame you are.

    \begin{frame}{autoplay next slide example}
    %% variable myframe decides how many frames the animation is composed of
    %%  variable rl defines the percentual variation in the position of the moving object
            \clip (-.5,-.5) rectangle (10,7); %% visible rectangle              
            \draw[draw=black, fill=black] (1+3*\rl, 2+4*\rl) circle (3pt);          
  • You could add \def\nomouse{nomouse}\def\autoplay{} to <1> and \def\nomouse{}\def\autoplay{autoplay} to <2>, and set animateinline options to [\autoplay,\nomouse]. Option poster is not really necessary as the first frame is shown by default. – AlexG Sep 28 '18 at 9:44
  • Off-topic: You don't need \usepackage{xcolor} with beamer – samcarter_is_at_topanswers.xyz Sep 28 '18 at 10:52

I was totally struggling to make this work, since i can't implement AlexG's solution to every single animation i want to use - this requires to split each animation into first frame and other frames, or have some other artificial slides before the animation could start.

For my purposes, of no controls

\begin{animateinline}[autoplay, loop, method=widget]

made the trick


For me I did this


and it works perfectly


I implemented a first brute force solution, which is not a real technical solution to this problem, but somehow it is a solution for this problem:

I just copied the frame and changed the frame before to \includegraphics.

Then I added before the next frame which contains the animation a


So when I now click on next slide the next slide appears and this has an autoplay.

(nothing else changes, the frame number is the same, so the audience should not notice it)

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.