Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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

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

2 Answers 2

up vote 8 down vote accepted

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):

\documentclass{article}
\usepackage{media9}
\begin{document}
    \includemedia[
      activate=pageopen,
      width=405pt,height=292pt,
    ]{}{movie.swf}
    \end{document}

(I had to insert the dimensions manually.)

share|improve this answer
    
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 –  rm -rf Apr 26 '13 at 1:41
    
Preview (or native Mac pdf) does not support SWF/GIF/etc plugins. –  Michael E2 Apr 26 '13 at 2:40
    
I noticed that if I don't specify the video dimension, nothing shows up. Why is that? –  Hawk Apr 27 '13 at 17:42
    
@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. –  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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.