Emacs pandoc-mode

Joost Kremers PhD Institute for German Philology Käte-Hamburger-Weg 3
37073 Göttingen Germany joost dot kremers at phil dot uni-goettingen dot de

pandoc-mode is an Emacs mode for interacting with pandoc. Pandoc is a program (plus libraries) written by John MacFarlane that can convert a text written in one markup language into another markup language. It supports as input formats markdown and (subsets of) reStructuredText, HTML, and LaTeX, and as output formats markdown, reStructuredText, HTML, LaTeX, ConTeXt, PDF, RTF, DocBook XML, EPUB e-books, OpenDocument XML, OpenOffice.org text document (odt), GNU Texinfo, MediaWiki markup, groff man pages, and S5 HTML and Slidy slide shows.

pandoc-mode is implemented as a minor mode that can be activated alongside the major mode for any of the supported input formats. It provides facilities to set the various options that pandoc accepts and to run pandoc on the input file. Features include:

Download

The source code is released under a BSD-license and available here:

Version 0.1.8: pandoc-mode.el

The development sources for pandoc-mode are also available at Github.com.

Please report any bugs you may find to me.

Also, if you have any suggestions for improvements, I'd appreciate hearing them.

Manual

The manual for pandoc-mode is available as HTML and as PDF.

Know issues

On OS X, if you install pandoc through cabal into your home directory and add ~/.cabal/bin to your path in ~/.profile, ~/.bashrc or some other shell's rc file, it is likely that Emacs won't see this changed PATH variable. If you then run markdown2pdf from within Emacs, you'll get an error in the output buffer:

markdown2pdf: Could not find pandoc

The easiest way to remedy this is to add the following line to your ~/.emacs:

(setenv "PATH" (concat "/Users/<user_name>/.cabal/bin:" (getenv "PATH")))

Change to your user name, of course.