tomcam
tomcam

Reputation: 5285

How can I get pandoc to generate double-spaced output in Word from markdown?

How can I get pandoc to generate double-spaced Word docs from Markdown? My command line is this:

pandoc --smart -o foo.docx chap1.md chap2.md

I know I can insert a style sheet if I compile to HTML then run everything through wkhtmltopdf, but obviously wkhtmltopdf doesn't have .docx output.

Upvotes: 1

Views: 1213

Answers (1)

scoa
scoa

Reputation: 19867

You can use a reference.docx file: http://pandoc.org/MANUAL.html#options-affecting-specific-writers

Get the default file:

pandoc --print-default-data-file reference.docx > custom-reference.docx

Change the Normal style in custom-reference.docx to be double spaced. You can then compile your document with:

pandoc --smart -o foo.docx chap1.md chap2.md --reference-docx custom-reference.docx

Upvotes: 2

Related Questions