Wednesday, 14 August 2013

Using Markdown to make a presentation

If you've ever been to any of my presentations you'll know that my presentations are black text on a white background, with dot points and not a lot of diagrams.

Over the years I've been persuaded to add funkier backgrounds and use the official template, but my presentations are basically in the format

header
    dot point
    dot point

which is not the most exciting. No, or very few diagrams, some code samples, and no embedded video. I personally feel it's about getting the message across as simply and clearly as possible.

In part it's because of the way I write - I tend to think in dot points - which is why I like markdown for meeting notes - and consequently my slides are really an outline of my talk.

Now it so happened I have a presentation that I've ended up not giving. It exists as an outline in markdown, and I got to wondering how easy it would be to turn it into a rough and ready presentation.

It's actually pretty easy, and it turns out to have been something that's had some discussion. There's a number of projects out there but there are basically two models
  • convert text to html, with links to images and store the lot in a directory and run a minimal web server to display
  • convert the lot to an html file with some css and embed any graphics into the html file
Option 2 is portable, option 1 has the advantage of simplicity especially if you have a spare webserver lying around - really it's just like the old Star Office html export where it dumped everything out into a directory and you uploaded it to a webserver.

Option 2 I though was perhaps a little more versatile, especially as running private webservers is something that tends to get frowned on.

Pandoc - my favourite markdown conversion tool - turns out to have some nice options to generate a file and the markdown structure required is something fairly simple structure:

## slide 1 header

* dot_point

---

## slide 2 header

* dot_point

ie something that is pretty simple to generate from a dot pointed presentation outline.

To generate the file only required a single command (I chose slidy out of the half dozen presentation options pandoc supports):

pandoc -t slidy -s markdown_source_file.md -o html_output.html --self

To keep life simple when generating the output fle I lazily dumped all the images in the same directory as the source file.

In case you're curious and want to have a look at the finished product I've put html output and markdown source up on my clouddrive account as a gzipped tar file

The result is pretty impressive even if it probably something that would upset the logo police, and while it's not something for a public presentation it's a very easy way of running up a quick presentation to summarise a discussion or walk people through an idea ...
Written with StackEdit.

No comments: