top | item 34439856

(no title)

mrehler | 3 years ago

Out of every tool I’ve ever used to make a .docx file from Markdown, Pandoc is the only one that has consistent results with converting Markdown headers to Word styles rather than just a bigger font size. Lots of Markdown tools in my tool belt, and would love to know of any more that can do this, because it’s really useful on the (unfortunate) occasions something needs to live as a Word doc.

discuss

order

Veen|3 years ago

I do wish there was an easy way to create Word document titles from H1s in Markdown. It makes sense that they should be converted to top-level headings, but it adds an annoying bit of friction to my workflow.

fiddlosopher|3 years ago

Oh, but there is!

    pandoc --shift-heading-level-by=-1 input.md -o output.docx
This will promote level-2 headings to level-1, and promote a level-1 heading at the top of the document to the document's title.