3

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)
  • 2
    Beamer can make fade in-outs, fake moving of objects (really static objects at different positions in consecutive slides), zooms of images, use animate ...but at the end of the day, a PDF is a PDF, not a multimedia player. – Fran Oct 1 '15 at 19:10
1

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.
  • 1
    Fancy transitions can also be supported or not by viewers. I don't know if this is the kind of thing the OP has in mind. (They aren't really animations but the way the viewer displays the change between one slide and the next.) – cfr Oct 3 '15 at 3:07
  • @cfr I did not mention page-wise transition because OP seems to ask object-wise transition. In any case, web browsers are better in implementing fancy things (talking about functionality and memory/time efficiency). It has been a long time since the last time I want to mimic HTML things in PDF. – Symbol 1 Oct 3 '15 at 3:17
  • I agree with the conclusion, but then I can't stand animations anyway so it makes no difference to me whether PDF does them well. I have once used a fading thing. But no movement. It was just an addition, anyway. I wasn't sure if all the desiderata were of a kind or not. – cfr Oct 3 '15 at 3:21
  • @Symbol: What about ctan.org/pkg/insdljs ? See also entwicklertag.de/karlsruhe/2012/vortraege/… if you speak German. – Make42 Oct 3 '15 at 12:14
  • @user49283 Inserting a (probably Turing complete) language is a whole new era of PDF. It is indeed a philosophical decision whether you want to prove that LaTeX is superior to PowerPoint/Keynote/etc or you stick to a subset of features, claiming that they are all you need. – Symbol 1 Oct 3 '15 at 13:09

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.