Skip to main content

C'est la Z

Using Emacs 41 Pandoc

Another Emacs quick hit today. Actually, not really Emacs. Today's video is a quick, really quick, look at Pandoc. Pandoc is a document converter.

Here are the formats that Pandoc can covert read from:

Markdown, CommonMark, PHP Markdown Extra, GitHub-Flavored Markdown, MultiMarkdown, and (subsets of) Textile, reStructuredText, HTML, LaTeX, MediaWiki markup, TWiki markup, TikiWiki markup, Creole 1.0, Haddock markup, OPML, Emacs Org mode, DocBook, JATS, Muse, txt2tags, Vimwiki, EPUB, ODT, and Word docx.

And here are the ones it can write to:

plain text, Markdown, CommonMark, PHP Markdown Extra, GitHub-Flavored Markdown, MultiMarkdown, reStructuredText, XHTML, HTML5, LaTeX (including beamer slide shows), ConTeXt, RTF, OPML, DocBook, JATS, OpenDocument, ODT, Word docx, GNU Texinfo, MediaWiki markup, DokuWiki markup, ZimWiki markup, Haddock markup, EPUB (v2 or v3), FictionBook2, Textile, groff man, groff ms, Emacs Org mode, AsciiDoc, InDesign ICML, TEI Simple, Muse, PowerPoint slide shows and Slidy, Slideous, DZSlides, reveal.js, PDF

That's pretty impressive

I was faced with an html file describing a lab for all the CSCI13500 students at Hunter. I wanted to modify it for my class and that was going to be a bear. I also wanted an easy way to have it render up on GitHub. With pandoc, it was trivial. I just typed:

pandoc -f html -t org -o lab3.org lab3.html

which converted the file to org-mode. This was trivial to edit and then I uploaded it to GitHub as the lab's Readme.org file which GitHub automatically renders on the project page.

Pandoc for the win.

I've also used pandoc to move between org-mode and word files.

If you haven't checked out pandoc, you should.

comments powered by Disqus