Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

up vote 2 down vote accepted

Pandoc

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.