Categories
Tools

Extract Inkscape Layers to PDF files for LaTeX Beamer Presentations

I like doing fancy presentations with little text (but in the titles, I heard that’s called “power titles” occasionally) but with a lot of graphics and animations. As a computer scientist who uses a lot of math stuff in his work, I of course use LaTeX even for creating presentations for its math features, although, in my opinion, LaTeX is not the perfect technology for making slides. My animations and graphics were done in TikZ so far, with all advantages and downsides: While on the one hand, you can use all the macros of your main document and profit from the wide range of powerfull TikZ/PGF libraries, TikZ animations can be quite brittle and hard to create and maintain.

After discovering the great textext plugin for Inkscape which lets you render LaTeX code from within Inkscape which can be updated (and re-rendered) after creation and allows for the inclusion of a LaTeX preamble, I decided to create graphics for my presentations in Inkscape. In practice, I create a document with the same size as my PDF slides and include a subset of my macros, maybe with a small set of additional definitions for fonts etc., in the preambles of my LaTeX objects. Animations are realized via Inkscape layers. Then, I toggled the layers according to my animation plan and exported several PDFs which I then included via a for-loop in my LaTeX beamer presentation. While that already constitutes a big step forward to WYSIWYG graphics / animations creation for LaTeX, this last step of manually exporting multiple PDFs is quite cumbersome, especially if you change something in your graphics. That’s where my small python script steps in.
The python script I wrote lets you annotate your Inkscape layers with LaTeX Beamer overlay specifications like <1,3-6,7-> — just append that to the name of a layer, and my script will automatically extract several PDF files where at each step, those annotated layers whose overlay range does not include the step are set to be invisible. Now, when you update something in your graphics and animations, just run the script to re-generate your animations. That’s the workflow I wanted to have.

Categories
Tools

Easier Typesetting of Proof Trees

A Frontend to the LaTeX Bussproofs package with accompanying VIM Plugin

Recently I wanted to typeset a quite large proof tree in LaTeX using the Bussproofs package. As usual, I didn’t do this by hand editing text files, but by using the convenient LyXproofs library for doing this in a what-you-see-is-what-you-mean manner within LyX. Still, I didn’t quite like the experience; the nice math support of LyX came at the cost of the tree no longer fitting into the window; also, I didn’t want to go the step back to plain LaTeX editing.

The solution I came up with is a new, lisp-like syntax for specifying proof trees along with a rendering engine translating trees specified in this syntax to LaTeX, either for including into existing files or for outputting a standalone file suitable for direct compilation.