114

Here's the deal:
In school I want to write my actual content in Markdown (using [Q10] or Notepad++) in school so that I can actually focus on writing without the ugliness of Word 2000 on my screen, but I have the problem of actually converting the Markdown into the final Word document so that I can set the line spacing, margins, cover page, etc.

How can I accomplish this?

I should also mention that I'm running said programs (except Word) off of my flash drive as PortableApps, the school computers run DeepFreeze, and I do have commandline access.

Breakthrough
  • 34,847
digitxp
  • 14,884

6 Answers6

136

Get pandoc version 1.9 or higher. Then:

pandoc myfile.txt -o myfile.docx

Recent versions of pandoc allow direct conversion of markdown to word.

14

This isn't a complete answer to your situation, but you may want to investigate using Pandoc which can convert Markdown into other formats including RTF (which MS Word should be able to handle reasonably well).

Unfortunately, I have no idea if this will work with the DeepFreeze system you describe.

moberley
  • 478
13

If you already have a Markdown tool for producing HTML, open the HTML in a browser and copy/paste into Word. Alternately, just open the HTML file itself in Word then save as Word format.

Doug Harris
  • 28,397
8

The method that has worked best for me is to use markdown to produce HTML, upload the document to Google Docs, select the option for Google Docs to convert it to their format, then download it as a DOC file.

Using pandoc to convert to RTF works (make sure to use --standalone option), but it loses the "style* of headers in Word.

Using Google Docs, the resulting DOC file keeps the notion of style so that you can change the formatting of all h1 headers in one step.

atlpeg
  • 91
  • 1
  • 2
3

If you work on a Mac, iA Writer now does Word (.docx) to Markdown and Markdown to Word (.docx) conversion: iAWriter.com

3

I like to use WriteMonkey, it's one of those distraction free text editors.

It exports from markdown to HTML or word. And it's portable. Requires .net though.

shuang
  • 31