19 February 2007 7:16 PM (scheme | guile | svg | presentations | inkscape)
50 ways to leave your presentation software
I've recently had occasion to make a couple of presentations, and have grown intolerant of OpenOffice. Presentations have two immediate purposes: to convey information and to affect people's emotions. OpenOffice gets in the way of both.
OpenOffice facilitates bullet-point-style presentations, in which all slides look the same. I don't think this is so good for memory retention, because the brain quickly gets the pattern ("next slide: more of the same"), and starts to think about other things. At that point, the listener feels that she's finished listening to your presentation, having already drawn her conclusions.
To keep the listener engaged, the presenter needs to be able to affect emotions, something that a bullet-point firing squad won't do. But every time I try to do something mildly different with OpenOffice, it throws up a panoply of dialog boxes, screen-tall context menus, and obscure editing modes to block my way. I just don't understand OO.o's fundamental idea, its structure. I'm left floundering and frustrated, falling back on a bullet-point form I know isn't going to work well.
So off I went on a search for something, anything different. My goal was something that let me control the what my presentation would look like, and have a result that was different from everybody else's work. Maybe that way I could hold an audience's interest for half an hour, that and my charm. Realizing that my charm is not universally acknowledged, I redoubled my search efforts.
inkscape, yes yes
While Inkscape is an artist's tool, I've used it in the past for technical drawings, preferring it over the Dias and XFigs of the free software landscape. Inkscape is very understandable and powerful, and also produces quality output. I wanted to use it for presentations.
After experimenting with various options, I accidentally happened upon Inkscape's XML editor, which showed me that the svg structure is actually rather simple. It's easy to open up an SVG file in your text editor and e.g. remove a layer from it. I decided to write a tool to split a layered SVG into many files, one per layer.
My result is svg-split, a script written in Guile, using guile-lib (Debian/Ubuntu package: guile-library). The solution was complicated by the presence of XML namespaces; specific comments are in the source.
I was left with the smaller problem of turning a set of SVG files into one PDF. rsvg-convert will do this, but exhibits some rendering bugs regarding text spacing. Because of some problems in rsvg, you have to make inkscape strip XML namespacing from the individual pages via inkscape -l. My script to turn a layered SVG to a PDF is here.
I also tried Inkscape's PostScript output, combined with psmerge from psutils, but psmerge shrunk the bounding box for each page to the drawing size instead of the page size, which was worse than the rsvg rendering bugs.
For doing the actual presentation, it turns out that Inkscape has a slideshow mode, which allows me to avoid the rendering bugs. You just pass all of the svg's to inkscape -s and it runs through them all without any interface. My script to do a presentation with a layered SVG is here. I got the window to go fullscreen via devilspie, writing the following into ~/.devilspie/inkscape-slideshow.ds:
(if (is (window_name) "Inkscape slideshow") (fullscreen))
Inkscape's slideshow mode is true ghetto. It responds to all key presses, even alt when you are trying to alt-tab away from it. However it does render correctly.
conclusions and further work
My current presentation-making process involves lots of work with pen and paper, ending up with an outline of what all of my slides should do. At that point I type everything into emacs, and start the work of making all of the slides in Inkscape, one layer per slide. I put some alignment lines and hints visible on the bottom layer so that I keep some consistency within the presentation. At the end I run my script on the SVG, which gives me a PDF for posterity; I run inkscape -s when actually giving the presentation.
One problem with this process is that Inkscape is not a publishing program. It doesn't understand paragraphs, for example. This is less of a problem than one might think -- presentations shouldn't have too many words -- but it is a minor irritation.
The slides-making process is still too painful. I think that the initial import procedure (from emacs to svg) should be easier; given that the basic SVG I'm generating is simple, I can make the first pass automatically generated from some source. I suspect a custom XML/SXML language would be most appropriate for the kinds of solutions I am interested in. It would be nice if someone with Emacs-fu could hack something to translate outline-mode's format to an s-expression structure.
That idea generalizes as "transforming structured text to SVG", which is valid for many forms of structured text. One interesting possibility would be Tomboy, the GNOME note-taking application. It stores its notes as XML, which can be translated to SVG via some kind of formatting transformer (am currently working up some ideas). You could make your whole presentation in Tomboy, and have a script walk the links in your notes, creating a presentation structure.
I am satisfied enough with the layered-svg solution that I'll continue to poke at it in the future when making presentations. Those of you that want to laugh at me as my strategy crashes and burns should drop by the GNOME room at FOSDEM on Saturday, where you can catch it in person. Comments welcome, and see you at FOSDEM!