Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In work I got assigned to do some translation work, I prefer working in vim rather than word and style it later.

Is there a program that will let me use Markdown style syntax to create Word compatible styling, including retaining headings (to be used for a Table of Contents)?

share|improve this question
up vote 3 down vote accepted


You can write your Markdown text as usual, then use Pandoc to create an RTF file, which can easily be opened and edited in Word.

Pandoc can read markdown and (subsets of) reStructuredText, textile, HTML, and LaTeX, and it can write plain text, markdown, reStructuredText, HTML, LaTeX, ConTeXt, PDF, RTF, DocBook XML, OpenDocument XML, ODT, GNU Texinfo, MediaWiki markup, textile, groff man pages, …

Pandoc is free, open source and comes for Windows, OS X, Linux and BSD. Check the user's guide here.

For example, use:

pandoc -s -o file.html file.txt
pandoc -s -o file.rtf file.txt
pandoc -s -o file.odt file.txt

… then open it in Word and style as you want. The -s option needs to be used to produce a standalone file. HTML should retain the syntactical "heading" elements, whereas RTF and ODT only style headings.

share|improve this answer
Will Pandoc create proper heading styles? The type that can be used to create table of content? – Ziv Sep 13 '11 at 11:15
With RTF, probably not, but you could convert it from an OpenDocument XML / ODT file to Word, which would probably produce the right headings. HTML might also be an option. – slhck Sep 13 '11 at 11:17
Just an update, the only method that preserved the headings was using HTML and then opening it in word. Both ODT and RTF didn't preserve the heading. – Ziv Sep 13 '11 at 12:04
While you're updating, the switch should be -s -o and need to be used with all three types of output. – Ziv Sep 13 '11 at 12:08
Ah, great, thank you! I meant to try it when I got home from work, but that saved me a minute :) – slhck Sep 13 '11 at 12:11

There is the Windows tool, mmd2pdf, which converts MultiMarkdown to PDF

It adds multiple syntax features (tables, footnotes, and citations, to name a few), in addition to the various output formats listed above (Markdown only creates HTML). Additionally, it builds in “smart” typography for various languages (proper left- and right-sided quotes, for example).

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .