如何从markdown中获取pandoc以在Word中生成双倍行距输出?

时间:2017-04-28 08:05:14

标签: pandoc

如何让pandoc从Markdown生成双倍行距的Word文档?我的命令行是:

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

我知道如果我编译为HTML然后通过wkhtmltopdf运行所有内容,我可以插入样式表,但显然wkhtmltopdf没有.docx输出。

1 个答案:

答案 0 :(得分:1)

您可以使用reference.docx文件:http://pandoc.org/MANUAL.html#options-affecting-specific-writers

获取默认文件:

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

Normal中的custom-reference.docx样式更改为双倍行距。然后,您可以使用以下命令编译文档:

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