Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create scientific presentations with Inkscape, InkSlides and InkTex

In this short article, I show you how to create nice scientific presentations using a combination of Inkscape and LaTex, made possible by two small tools I wrote.

The Tools

  • Inkscape: Our main vector graphics editor to draw the presentation.
  • InkSlides: The python script to convert an Inkscape SVG file to a PDF presentation. Heavily inspired and partly copied from inkscapeslide.
  • InkTex: An inkscape extension to add LaTeX support to inkscape. A rewrite of textext.

The installation is described on the corresponding websites, so I'll jump right into the usage.

If you use Arch Linux, check out the AUR package inkslides-git.

How to use InkSlides

I recommend you open the example SVG document in Inkscape while you read further. It will help you understand what I am talking about. I also assume, inkslides(.py) is available on the command line.

InkSlides loads your Inkscape SVG document and generates PDF slides from SVG layers. The description, which layers to include in which order, is given in a single text element in a layer called content.

The syntax for the content description in this text element is simple:

background, slide1
background, slide2
+slide2_frame2
+slide2_frame3
background, slide3
background, slide3*0.5, slide4
....

Each line is a slide in the presentation. Each word is the name of a layer in the SVG file. If a line starts with a +, this layer is added to the list of layers to display. So, the example above would verbosely read:

background, slide1
background, slide2
background, slide2, slide2_frame2
background, slide2, slide2_frame2, slide2_frame3
background, slide3
background, slide3*0.5, slide4
....

The *0.5 means, that the slide3 layer is included with 0.5 opacity. Please see the example SVG file to understand the syntax better.

The layer in inkscape

If everything is in place, save your presentation as SVG and run

inkslides.py presentation.svg

to convert it into the presentation PDF file.

Continuous mode

If you run inkslides -w/--watch presentation.svg, the script keeps running after an initial compilation and watches the SVG file for changes. If a change occurs, i.e., you saved the file in inkscape, it automatically recompiles the changed slides. This let's you forget about it and concentrate on Inkscape and your PDF reader. :)

How to use InkTex

Simple: If it is properly installed, in Inkscape run Extensions -> InkTex and a window opens. You can input your LaTeX code there. In the settings tab, you can set a scaling factor and a preamble file, with which you can actually use all the power of LaTeX in your presentation.

This is, how InkTex looks

Some more tipps:

  • I hide and lock layers I am not currently working on
  • I group the layers in Inkscape logically, so they correspond to my slides
  • The usual Width-Height-Ratio for presentations is 4:3
  • Pressing # in Inkscape displays a grid, which makes it easier to align stuff.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment