Skip navigation

Tag Archives: impress

Over the years, I met a number of people — trainers, speakers, hackers — who produce a lot of slide-ware (decks often more than a hundred pages wide), but never really use the conventional presentation packages for it.

Instead, they script things, (partially) autogenerate text, and use one of the markup-to-presentation converters out there: latex beamer, showoff, pandoc, or S9 (there’s much more).

Asking them why, the answer is always one or more of the below:

  • I prefer my text editor over the slide editing package
  • I want to track my content in a revision control system
  • I auto-generate content, or need to frequently merge stuff
  • and (rather infrequently): because PowerPoint is just sooo not cool

I can’t really help with the last item, but the first three clearly resonate well with me. While I was preparing slides for a hands-on session about ceph last year, I thought it would be pretty nice to get some tool hacked up that formats all the shell commands in nice typewriter script, and let me re-generate slides after every major rework (we were in the middle of moving demo setup to AWS, i.e. the ground was changing under our feet substantially). Born was the first rough cut of odpdown: https://twitter.com/thooorsten/status/532881180572811266

Why I didn’t re-use one of the existing tools from above? Well, the event in question had strict requirements on the design and formatting of the slides, so I was stuck with a given Impress or PowerPoint slide template. And secondly, I think the auto-generation software space in the ODF ecosystem is under-developed — this is therefore to some extent a showcase for what is possible, and what existing libraries are there to build upon.

So the initial hack has since been refined a lot, and test-driven by a few people (12 issues filed in two days by Adam Spiers, I was embarrassed!). Therefore today I feel confident enough to announce version 0.4.1 as a beta release a bit more widely:

Using it should be a matter of installing the package (manual installation instructions and a quick usage howto here), typing up some markdown, and calling it thusly:

     odpdown \
     --break-master=break_slides --content-master=content_slides \
     markdown.md corp_template.odp out_slides.odp

A quick walk-through PDF for basic markup is available here:

Basic markup

Basic markup

(/source)

Conversely, a quick walk-through PDF for more advanced markup is here:

Advanced markup

Advanced markup

(/source)

Have fun!

Advertisements

I have been working a bit on improving the ooxml import for Impress recently, focusing on the SmartArt stuff from PowerPoint 2k7. A really nifty feature indeed. Cunningly enough, MS does not store any fallback shapes for SmartArt, thus leaving me with the sole option of implementing a SmartArt layout engine myself. Here’s what it can do already:

quickdiagram0a

And this is how the original thing looks like:

ppt03

But there’s more to it. Since I needed a SmartArt layouting engine anyways, it was quite natural to (re)use that for actually editing and relayouting the content in Impress! For that to work, of course either the ooxml input fragments or some derived data structure have to be available at the shape; again the most straight-forward way was to use ooxml directly (in the form of an in-memory representation of the xml tree, aka DOM). Having a group shape with four extra custom attributes then gives something like this:

smartart01

So “editing” this shape means tweaking the data xml fragment, i.e. adding or removing text or changing attributes, and then re-triggering the import/layouting engine. I just love it when code reuse is that easy. 😉

What I have now is something working end-to-end, with basic import, basic layouting and basic editing working. What comes next is improving all the details, i.e. supporting all layout types, editing all aspects, not only text etc. Stay tuned!