pandoc - a swiss army knife markup format converter

The magic behind tools like knitr

R
Author

Mark Isken

Published

May 2, 2013

In creating a few R and Python tutorials, I really came to like writing in the markdown language. Markdown is plain text, easy on the eyes, and simple. Even better, both R Studio and IPython Notebooks let you use markdown to create interactive notebook like things containing text and runnable code.

Along the way I learned about a tool called pandoc for converting between various markup/markdown languages. So, when I realized that I forgot to install a WYSIWYG editor module in Drupal, I figured I would just write this post in markdown and then convert it to HTML to paste into Drupal (later I found a markdown filter for Drupal, :). Pandoc provides a simple way for doing conversions like this. It’s even got a web based tool for trying it out. Here’s some markdown that you can copy and paste into their web page so you can see how it works. Convert it to HTML and view in a browser.

    ## This is a Heading 2 ##

    I **love** [xkcd](http://xkcd.com/627/). Why?
        - they have Python comics
        - author is crazy smart and lol funny
        - shows that you can convey a ton of meaning with stick figures 

    ### And here is a Heading 3 ###

    What exactly is a *factory function*?