Skip to main content
November 19, 2012

DITA for presentations, aka how to avoid PowerPoint

After a number of years using PowerPoint and OpenOffice/LibreOffice Impress to create slide decks, I’ve grown frustrated with the enforced separation of information in PowerPoint-like products.

There are slides, there are notes, and there are handouts, but there’s no way to integrate the three. Additionally—at least in LibreOffice—I found that printing handouts never worked the way I wanted; I always ended up printing the slides six-up, rather than using the “handouts” option.

One day the thought occurred to me: what if I could use DITA topics for my slides?

And how might the DITA tagging look? Most slides are sets of bullet points. If I could integrate the bullets for slides with additional notes for readers, I could generate two different types of output for different uses: a set of HTML files containing the bullet points for the slide deck, and a PDF containing integrated bullet points and notes as handouts.

This meant that I needed to develop a set of rules to distinguish between information intended for slides and information intended for notes. The easier the set of rules, the easier it would be to pour information into DITA topics without having to apply extra elements or attributes. Perhaps elements with an implied purpose flies in the face of semantic tagging. For now it will do. If I feel driven to it, I can always create a slide specialization that attaches more specific names to the elements.

Initially I considered using section elements for each bullet point (the title element would contain the bullet text; the rest of the section would contain the notes). However, the title element is fairly restrictive in its content. I could foresee being hamstrung by some of these limitations.

In the end, I decided to use a simple unordered list (ul element). But how to distinguish bullets from notes? Mixed content is a beast that can confuse writers and annoy transformation developers. I’ve tamed the beast more than once; now is the time to make it do my bidding. These are the rules I use:

DITA input

  • A basic slide topic contains a ul element with one or more list items (li element).
  • The initial content in a list item is untagged text. The text is transformed into a bullet point when generating slide output.
  • Any element inside the li element—except the paragraph (p) element—is used to create slide output. These include note, table, image, codeblock, and nested ol or ul elements.
  • A p element inside a list item (li) is ignored by the slide transform. However, when using the pdf transform to generate handouts, these p elements are handled normally and display as notes on the bullet points.
  • Nested lists behave in exactly the same way.
  • Because there are always exceptions to rules, I allow two outputclass attribute values:
    • If a p element has outputclass=”slides”, the element is output in the slides.
    • If any element has outputclass=”notes”, the element is not output in the slides.

HTML output

There are a number of advantages for encoding my slides this way:

  • My notes are integrated with my bullet points, so I can edit them both at the same time.
  • My notes allow me to create useful handouts that provide far more information for students than a simple set of bullet points.
  • My content is no longer locked into a binary format. I can write transforms (or take advantage of existing transforms in the DITA Open Toolkit) to generate many different forms of output.
  • If I want to change the appearance of our slides, I can make a small number of changes to the transform, rather than hassling with importing templates into slide decks.
  • I can use the DITA filtering attributes to create slides that cover the same topic for more than one tool or platform. This is a really big win.
  • Much as I hate to say it, LibreOffice Impress crashed on me once too often. While I rarely lost any content in these crashes, they were frustrating and time-consuming.

Slide decks often contain special “master pages” for the title slide, section slides, and slides that direct the students to work an exercise. An outputclass attribute on the topic element allows me to specify a master page. Most of these master page attributes are implemented in the CSS, so I can add new master page types by adding new selectors to the CSS.

As a finishing touch, the output HTML includes links to the previous and next slides as well as a link to a table of contents. To make presentation easier, the HTML slides respond to ENTER on the keyboard and keypad to advance to the next slide and Backspace and keypad minus (-) to return to the previous slide.

Of course, there are detractors from the whole idea of using slides in presentations; Edward Tufte has been decrying them for years. As today is the sesquicentennial-minus-one of Lincoln’s Gettysburg Address, this might serve as a fitting example of why: http://www.norvig.com/Gettysburg/index.htm

Have you considered generating slides from DITA? What advantages have you found?