Graphics, Figures & Tables ⇒ Animations in TeXShop
Animations in TeXShop
Good day,
I have been using Latex for a few years now and have recently discovered that you can put animations into the generated PDF's. However, I cannot seem to get it to work.
I am using TeXShop with the following
\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{animate}
\begin{document}
\animategraphics[controls, loop]{4}{Parabola_}{1}{5}
\end{document}
I have 5 images saved as PDF's named Parabola_1.pdf, Parabola_2.pdf, ... .
As stated this does not produce an animation, rather, it simply produces a document with the first image, Parabola_1.pdf, as a figure. Any advice on how to insert animations from a set of pdf's would be appreciated.
Thanks in advance,
Erik Sweet
I have been using Latex for a few years now and have recently discovered that you can put animations into the generated PDF's. However, I cannot seem to get it to work.
I am using TeXShop with the following
\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{animate}
\begin{document}
\animategraphics[controls, loop]{4}{Parabola_}{1}{5}
\end{document}
I have 5 images saved as PDF's named Parabola_1.pdf, Parabola_2.pdf, ... .
As stated this does not produce an animation, rather, it simply produces a document with the first image, Parabola_1.pdf, as a figure. Any advice on how to insert animations from a set of pdf's would be appreciated.
Thanks in advance,
Erik Sweet
Last edited by sweete on Sat Sep 11, 2010 10:37 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

Re: Animations in TeXShop
Which PDF viewer do you use? Note that only AdobeReader is able to play the animations.
Alexander
Alexander
Re: Animations in TeXShop
I currently have Adobe Reader 9
Erik Sweet
Erik Sweet
Re: Animations in TeXShop
Check Adobe Reader settings with regard to JavaScript. It needs to be enabled.
Are the graphics files of the sequence really different?
Are the graphics files of the sequence really different?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Animations in TeXShop
Consider to rename your graphics files. Perhaps there is the same problem a with graphics inclusion by means of the graphicx package. So avoid special characters like blank space or underscores in the name and the path of the files.
Thorsten
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Animations in TeXShop
It appears as though I had it all along. I was not aware that you needed to view the pdf on its own rather than the one produced by Typesetting.
Thank you though, I would not have realized that had I not attempted to enable the Java Script.
I ended up using the following
\begin{animateinline}[autoplay]{1}
\includegraphics{parabola1.pdf}
\newframe[1]
\includegraphics{parabola2.pdf}
\newframe[1]
\includegraphics{parabola3.pdf}
\newframe[1]
\includegraphics{parabola4.pdf}
\newframe[1]
\includegraphics{parabola5.pdf}
\end{animateinline}
to show each pdf at a rate of 1 frame per second.
Thanks again,
Erik Sweet
Thank you though, I would not have realized that had I not attempted to enable the Java Script.
I ended up using the following
\begin{animateinline}[autoplay]{1}
\includegraphics{parabola1.pdf}
\newframe[1]
\includegraphics{parabola2.pdf}
\newframe[1]
\includegraphics{parabola3.pdf}
\newframe[1]
\includegraphics{parabola4.pdf}
\newframe[1]
\includegraphics{parabola5.pdf}
\end{animateinline}
to show each pdf at a rate of 1 frame per second.
Thanks again,
Erik Sweet
Animations in TeXShop
Of course. If you \includegraphics a pdf containing an animation, the special PDF stuff (widgets, frames, JavaScript etc.) needed by the animation gets lost, as it would be the case with more common PDF features like hyperlinks.sweete wrote: I was not aware that you needed to view the pdf on its own rather than the one produced by Typesetting.
Why so complicated.... I ended up using the following
Code: Select all
\begin{animateinline}[autoplay]{1} \includegraphics{parabola1.pdf} \newframe[1] \includegraphics{parabola2.pdf} \newframe[1] \includegraphics{parabola3.pdf} \newframe[1] \includegraphics{parabola4.pdf} \newframe[1] \includegraphics{parabola5.pdf} \end{animateinline}
Firstly, you do not need to repeat the frame rate with every \newframe command if it does not change. The frame rate argument of \newframe is optional, as it is indicated by the brackets around the number.
Secondly, in your case, an external graphics file sequence is to be animated. This is what the \animategraphics command is intended for:
Code: Select all
\animategraphics[autoplay]{1}{parabola}{1}{5}
Alexander