Is it possible to presserve my animation and manipulation plots in the pdf?

  • 2
    $\begingroup$ Do you mean CDF (Computable Document Format) or PDF (Portable Document Format)? $\endgroup$
    – Silvia
    Apr 25 '13 at 19:45
  • $\begingroup$ PDF is animation capable, but you will be in much less pain with conversions if you just use CDF - as @Silvia recommended. $\endgroup$ Apr 25 '13 at 20:00
  • $\begingroup$ @VitaliyKaurov I guess converting to animation in PDF would be highly difficult, if not impossible.. I personally like to see a convertor to Asymptote. $\endgroup$
    – Silvia
    Apr 25 '13 at 20:06
  • 1
    $\begingroup$ No I actually do mean pdf. As in files which are read by Acrobe. $\endgroup$
    – Hawk
    Apr 25 '13 at 20:08
  • $\begingroup$ Reason is because I need to include the animation in my LaTeX $\endgroup$
    – Hawk
    Apr 25 '13 at 20:10

You can export animations to SWF:

movie = Animate[Plot[Sin[x + a], {x, 0, 10}], {a, 0, 5}];
Export["movie.swf", movie]

You can import them in LaTeX (see TeX SE):


(I had to insert the dimensions manually.)

  • $\begingroup$ I often use media9 to insert mp4s in my beamer presentations. However on OS X, it looks like only Adobe Reader can display them. Preview and Skim simply display a blank page $\endgroup$
    – rm -rf
    Apr 26 '13 at 1:41
  • $\begingroup$ Preview (or native Mac pdf) does not support SWF/GIF/etc plugins. $\endgroup$
    – Michael E2
    Apr 26 '13 at 2:40
  • $\begingroup$ I noticed that if I don't specify the video dimension, nothing shows up. Why is that? $\endgroup$
    – Hawk
    Apr 27 '13 at 17:42
  • $\begingroup$ @jak Do you mean in the LaTeX file? I know a lot about Plain TeX but little about LaTeX. It looks like the default size is 0pt x 0pt. (Put rules around it -- they show up as a dot.) You should ask on tex.stackexchange.com. Perhaps there's a way to automatically read the image size. $\endgroup$
    – Michael E2
    Apr 27 '13 at 21:25

Actually, *.avi or *. SWF can be read by Adobe Acrobat Pro.

You can try as Michael E2 did:

movie = Animate[Plot[Sin[x + a], {x, 0, 10}], {a, 0, 5}];
Export["C:\\movie.avi", movie]

Use Adobe Acrobat Pro to open the file exported, i.e., C:\movie.avi.

Double click on the figure will animate it.

enter image description here


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.