Pandoc: Convert Your Documents
Pandoc is an Open Source tool (and a library) for converting documents from one format to another. Specifically, it can take a document written as Markdown, reStructured Text, Textile, HTML, DocBook, or LaTeX and convert it to any of a plethora of other formats, including:
- Word DOCX
- Open Document Text (ODT)
- HTML, XHTML, or HTML 5
- EPUB ebooks
- Many others
The Pandoc project provides installers for Windows and Mac. Pandoc already has packages in most (if not all) of the popular Linux distributions.
In addition to its general conversion functionality, Pandoc augments the input formats with support for citations, mathematical notation, and many Markdown extensions. <!--break-->
The Pandoc documentation has dozens of examples, but here's one quick one to illustrate how easy it is to use:
$ pandoc -S example.md -o example.docx
The above converts the
example.md Markdown document into a Microsoft Word DOCX document. The
-S flag produces "typographically correct" output. That is, it converts double-dashes to en-dashes, quotations to "smart quotes" and three periods to ellipses.