6

I use TikZ with the standalone document class to generate figures for a presentation using reveal.js, i.e. outside of LaTeX. Some of these figures undergo a few animation steps, which require little modification to the source code. I would like to automate the generation of all variants. Is there a LaTeX-only way to generate multiple output files in a single run? I have used a python script that repeatedly runs LaTeX and modifies the source in-between, but I would prefer a one-file solution. Could TikZ's externalize library help here?

burnpanck
  • 339
  • Which image format is expected? PDF? PNG? – Paul Gaborit Feb 11 '17 at 14:08
  • Depending on the complexity of the image, either SVG or PNG. But that is an unrelated issue, and I know how to handle that. PDF output is fine as well. – burnpanck Feb 11 '17 at 14:19
  • Standalone has a multi-page capability (one page per image/environment). – John Kormylo Feb 11 '17 at 15:04
  • 1
    This should be relatively straightforward in lualatex. True, this use lua, but inside the latex file. – JPi Feb 11 '17 at 16:20
  • I use lualatex anyway, so an example would be very much appreciated! – burnpanck Feb 11 '17 at 16:41
  • Related?: http://tex.stackexchange.com/questions/214474/is-it-possible-to-use-beamers-overlay-specifications-in-other-documentclasses/214787#214787 – Ignasi Feb 11 '17 at 20:33
  • See for example this answer of mine. Using standalone class and compiling this kind of sources, you get a PDF with a "page" for each figure. These "pages" have a tight bounding box, so you can include them later in another document via \includegraphics[page=n]{file.pdf}. Or convert the pdf to gif via imagemagic, as I did to generate the animations :-) – JLDiaz Feb 14 '17 at 19:11
  • While I will use the generated figures outside of LaTeX, generating PNGs from multipage PDFs is certainly possible in a single command, so I'd say simply having multiple tikzpictures in a single standalone document counts as answer (I didn't know that this works, particularly that the pages are still tight). Maybe we should close this question as a duplicate of the one linked by @JLDiaz ? – burnpanck Feb 15 '17 at 10:37

0 Answers0