Markdown pandoc slides: easy and quick ways to create slides from markdown with pandoc

I’m frequently in the situation of being required to quickly create a handful of slides on the go/on the road. The slides are typically used at a quick meeting where I benefit from some supporting slides. Because in the end I can use my laptop for the slides, converting any type of slide source information into slides immediately before using them is an option for me. This allows me to e.g. create slides in the form of text on my phone, then convert them to slides on my laptop. The only requirement I personally have for this is that I can create slides with pretty much anything, so simple text in any form of text editor or note app on a phone would be perfect. This is why I’ve tried e.g. creating slides from markdown (which can be written easily in any editor also on phones), such as with MarkdownPresenter in my previous post. In my opinion, there are a few even simpler and better solutions to this problem. One of them is using pandoc for converting slide source code, such as markdown, into slides. In my opinion, using pandoc has two major advantages:

  • Pandoc is a well know and widely available tool, no exotic SW is required for creating slides from slide source. Pandoc is the all-in-one solution for this problem. And it can be installed just from your repositories, whichever distribution you use (it’s even available for Mac and Windows). So pandocs is a stable solution for solving this problem.
  • Pandoc is extremely powerful in the one job it does: converting different forms of documents. With pandoc, slide source can be e.g. markdown, and some formats very similar to classic markdown, as well as other formats (check the pandos demos page!). And pandoc allows different output formats for slides: pdf, html, etc. Means: you can create different versions of the same presentation, e.g. for presenting pdf slides + putting html sidles online, without any overhead.
  • Pandoc conversion is one command only, hence once you’ve written your slide source code, the overhead for getting actual slides is literally zero. It’s as easy as it sounds: write markdown slides, use one pandoc command to create slides, done.

Here’s some simple markdown source to create slides from:

% Title
% Author
% Date

# Slide 1 title

Some super quickly created demo slides

* Do not need anything else than markdown
    * Slides title starts with # (also starts a new slide)
    * Bullet points, newlines, empty lines: all standard markdown
* However, can also use other stuff, e.g.:
    * Some HTML (e.g. \<center\>)
    * When using pandoc beamer, can use latex commands (e.g. \\center, \\large, etc)\dots

# Slide 2 title

\center The slide syntax is so simple that you can quickly create a handful of slides on basically any device in any editor. E.g. on your mobile on the way to the meeting where you need the slides. Right before the meeting starts you use pandoc to create the actual slides from your source.

Using this source, pandoc can create different slides, including Latex Beamer (pdf) and HTML. Two extremely simple and minimalistic examples – out of the many available – are:

1. create minimalistic pdf slides:

pandoc -t beamer -o slides.pdf

2. create minimalistic continuous text representation as html. This does not split the content into slides, hence allows for effective searching for content details on e.g. an intranet website:

pandoc -s --webtex -i -t slidy  -o slides.html

pandoc supports way more more features for creating slides then only those two very basic examples. Be sure to check out the pandoc demos page to see which source you can use with which command to create which set of slides!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s