[Tex/LaTex] Animations in LaTeX for Presentations

animationspresentations

What's this about

Is it possible to create animations in LaTeX for presentations? That is what kept me from using it for presentations so far. What I'm looking for especially is:

  • Fade in
  • Fade out
  • Move an object from a to b and along a path
  • change size of an object

Nice to have would be a variety of "appear"-animations.

I have noticed that the packages multimedia, movie15, animate exist. I think only the last one is of interest for me.

The alternative for me is not PowerPoint by the way, but going with a HTML5 framework like deck.js with animation framework (which I'd still have to learn).

Questions:

  1. Would animate do the job for me and how difficult is it to learn?
  2. Is there another alternative package?
  3. When I write "object" I mean as well a group of objects. Would that be possible?
  4. How does animated presentation in latex compare to animated presentation in HTML5 frameworks?
  5. How would good does https://www.ctan.org/pkg/insdljs work for that? (See as well http://entwicklertag.de/karlsruhe/2012/vortraege/javascript-im-latex-quellcode-zur-programmierung-von-pdf)

Best Answer

Since you are not asking for any specific product, I would like to give some explanation without concrete example.

  1. Package animate would do the job that eat a PDF (sub)file and embeds it into the main PDF file. So it is possible to, say, draw a series of TikZ pictures onto an individual file and make it alive in the main one. It has a vivid document and I guess that makes it easy to learn.

  2. Probably yes. But the mechanism is the same: you embed something, movable or speakable, into the main PDF file, and then play it, automatically or manually. PDF readers does not like embedded file very much, so it does not really matter if there are alternatives.

  3. In PDF standard there is a feature:

Optional content (PDF 1.5) refers to sub-clauses of content in a PDF document that can be selectively viewed or hidden by document authors or consumers. This capability is useful in items such as CAD drawings, layered artwork, maps, and multi-language documents.

Please notice that it says viewed or hidden: there is no transition defined.

  1. As far as I know CSS defines some simple transitions, in which case browsers need to fill-in the intermediate frames by calculating the appropriate position/color/etc of objects. However in PDF, you need to generated the intermediate frames by yourself and then embed them. A simple math shows that If you apply, say, fade-in to all objects in your PDF file, all objects will be repeated, say, 20 times if there are 20 intermediate frames. Ultimately you would end up with a 20x file size.

In conclusion, they are all possible. But one have to realize that most PDF readers does not support what animate/media9 produces. For example on Mac, most people have Preview as the default and the only PDF reader, which shows nothing when it encounters those fancy things. Even your PDF reader support these features, they are definitely not designed to support a lot of them.

In some sense, this makes your Portable Document Formate file not portable anymore.

Cheat list

PDF standard support the following:

  • Embedding external PDF files and play them as they are GIFs in webpages. Accessible by the package animate.
  • Page-wise transition. An incomplete list can be found in Beamer document II 14.3.
    • you can control the duration of the transition, which makes your main PDF file a huge GIF.
  • Optional content Group. No transition defined. Javascript used. Accessible by the package ocg-p.
  • Embedding multimedia files. Accessible by the package media9. (movie15 is obsolete.)
    • Embedding 3D objects. This is a special case. the language Asymptote and the package asymptote do the job.