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

I sometimes have to present on other people's equipment, such as machines running stripped down Linux distributions, presentation servers with a bare-bones PDF viewer running in a virtual machine, or a Windows box with a heavily locked-down Adobe Reader (e.g. with JavaScript disabled). So far I've tried to avoid doing anything fancy with beamer. But for some concepts, animations seem necessary.

How can one create PDF presentations in LaTeX, preferably with beamer, which include animations that work on most PDF viewers?

Ideally, if the animations don't work then they should degrade gracefully. For instance, the first and last frame could still be shown.

Beamer has \animate but this requires the PDF viewer to support showing several slides in succession, without manual intervention. Jens Nöckel suggests using external movies, which seems even less likely to work; this relies on a viewer being available for the movie format, and that the movie viewer can be called by the PDF viewer.

Older documents suggest MetaPost or animated GIF files, which seem hacky (though I will consider them if no other alternatives exist).

Please discuss only one main approach per answer.

share|improve this question
3  
Out of curiosity: what PDF viewers except Adobe Reader are able to show animated GIFs or MetaPost? I might be mistaken but as far as I know, the answer is “none”, and your quest is hopeless. –  Konrad Rudolph Jul 28 '10 at 8:19
    
What happened to the old answers to this question? –  Will Robertson Jul 28 '10 at 8:28
    
@Konrad: For Windows, Adobe made an Active-X control which is embedded in Office. I guess you can watch them in Power Point. –  Charles Stewart Jul 28 '10 at 10:31
    
@Charles: granted, but I guess that does’t solve this problem since this is actually the same component that’s used in Adobe Reader so if the AX control is installed chances are, so is Adobe Reader. –  Konrad Rudolph Jul 28 '10 at 10:43
1  
@András: movie15 requires not only Adobe Reader, but also an external media player and Windows. Package animate only needs Adobe Reader. –  AlexG Apr 8 '11 at 12:19

3 Answers 3

up vote 13 down vote accepted

The movie15 package allows you to set graphics or text, including the first frame of the movie, to display if the movie is inactive. This can be achieved with the text and poster options (taken directly from the documentation):

\includemovie[
  text={\includegraphics[scale=2]{path/to/poster}}
]{}{}{path/to/movie}

will display the image specified by path/to/poster, scaled to twice its size, and

\includemovie[
  poster,
  text={\phantom{\includegraphics[scale=2]{path/to/poster}}}
]{}{}{path/to/movie}

will display the first frame of the movie, and make it the size of the scaled path/to/poster.

This obviously doesn't make the included movie playable in any more locations than it otherwise would be, but it does make it more elegant when playback is unavailable.

share|improve this answer
    
Very useful, thanks! –  András Salamon Jul 28 '10 at 21:09
3  
Quick comment that movie15 has been superseded by media9, after this answer was posted. –  johntex Aug 8 '13 at 6:56

The easiest way to produce animations from image sequences (pdf, mps [metapost], jpeg, png, jb2 with pdflatex; ps/eps, mps with latex) or inline images (pstricks, tikz) is to use the animate package. Depending on the option settings, poster=first or poster=last, bare-bone viewers without JavaScript, such as Xpdf, GV or GSview will display the corresponding animation frame. For playback, however, Adobe Reader is indispensable. Animated Gif must be split into png or eps sequence before embedding, because it is not supported by the PDF specification.

http://www.ctan.org/tex-archive/macros/latex/contrib/animate/animate.pdf

share|improve this answer

As discussed in http://stackoverflow.com/questions/2428372/insert-video-clip-in-a-lyx-presentation-and-play-it-in-gnu-linux, you can use the multimedia package to embed movies (mpg, mp4) in a way that you can play them in Okular. Minimal example:

\documentclass{article}
\usepackage{multimedia}
\begin{document}
\movie[height = 0.6 \textwidth,width = 1.0 \textwidth]{}{animation.mpg}
\end{document}
share|improve this answer
1  
+1! the only solution that worked with me so far! thanks! –  smihael Jan 27 '13 at 14:42
1  
Good answer. This works with Okular but sadly not with impressive:( –  Gabriel Feb 7 '13 at 0:08
    
That's probably because impressive still relies on the antique Xpdf. Maybe you can ask the developer team to write a backend for the more advanced Poppler and they might be able to implement movie embedding easily. –  Turion Feb 8 '13 at 17:43

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.