This is a "nice to have"-question, I guess:

I'm using the animate package to show a sequence of software dialog screenshots. In getting through the series I added that useful but ugly looking controls panel (yes, I have tried different fg/bg-colors ... it didn't make the thing better). The screenshots are these usual <BACK/NEXT> dialogs.

Is it possible to get the animation command FORWARD/BACKWARD in these NEXT> and <BACK button areas in the screenshots, so that -- similar to the real software -- the reader must click to 'NEXT' in the sceenshot to get the next pic and clicking 'BACK' shows the previous screenshot?

Hope, I could express it understandable ...


1 Answer 1


This is a nice example of using the JavaScript API of animate and the \mediabutton command of media9.

User Caramdir's excellent onimage package is used to place the buttons onto the animation. However, we have to patch onimage.sty in order to not use \includegraphics.

For the code below to compile, copy the example image files from package mwe into the current directory as

cp $TEXMF/tex/latex/mwe/example-image-a.png ./example-image-1.png
cp $TEXMF/tex/latex/mwe/example-image-b.png ./example-image-2.png
cp $TEXMF/tex/latex/mwe/example-image-c.png ./example-image-3.png

since we need numbered images for \animategraphics.

enter image description here


\usepackage{media9} % buttons via \mediabutton

%get it from http://bazaar.launchpad.net/~tex-sx/tex-sx/development/view/head:/onimage.dtx

%patch onimage.sty not to use \includegraphics
        %\node[inner sep=0] (image) {\includegraphics[#1]{#2}};
        \node[inner sep=0] (image) {#2};


  }[tsx/show help lines]
    \node at (0.8 , 0.8) [anchor=south east, inner sep=0pt, outer sep=0pt] {
      ]{\fbox{\small\strut back}}};
    \node at (0.8 , 0.8) [anchor=south west, inner sep=0pt, outer sep=0pt] {
      ]{\fbox{\small\strut next}}};

  • Uh ... wow, how cool is that? Exactlely what I was looking for => THANKS!!!
    – tobber
    Jul 30, 2015 at 12:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .