I transformed a gif in a serie of png files and I animated it in my pdf with the command \animategraphics
. I want to have only a play button shown, not all the controls. Is there a way of doing this?
Here is the full command that I used at the moment:
\animategraphics[loop,width=\textwidth]{50}{./figures/sim_gif/res_gl_animation_}{0}{399}
Thanks.
Edit:
Here's a MWE:
\documentclass[letterpaper, 12pt, final]{article}
\usepackage{graphicx}
\usepackage{animate}
\begin{document}
\begin{figure}
\centering
\animategraphics[loop,width=\textwidth]{50}{./figures/sim_gif/res_gl_animation_}{0}{399}
\caption{Some animation for MWE}
\end{figure}
\end{document}
Best Answer
Specific buttons from the available set of controls can be selected as follows:
Thus, to show the play button alone,
is sufficient.
Example:
Alternatively, the JS API of
animate
can be used. It gives access to the animation objects in a PDF file.The
\mediabutton
command from themedia9
package can be used to create custom buttons as in the code listed below.Instead of Play/Pause strings, you can
\includegraphics
image files as button faces for the Play and Pause buttons, or draw something with TikZ.A single toggle button for play-pausing an animation is given in Fig. 1 in the
animate
docs. Here, two buttons, one for play, another for pause are inserted below the animation:Note that 50 frames per second, as specified in OP's example, is way too much and will hardly be achieved by AdobeReader. FPS 20 is sufficient for smooth playback (FPS 25 is a typical value for video encoding) and can be achieved if the image files are not too big and complex.