Search Icon, Magnifying Glass

Marmanold.com

Graduation Cap Heart Question Mark Magnifying Glass

Word to Markdown Conversion with Footnotes

Many of the essays on this site start their life in Microsoft Word or Scrivener. Early on, I would have to convert essays to Markdown for posting manually. This generally worked okay, but I lost my footnotes. I tried Word to Markdown for a brief while, but it didn’t work entirely as I’d like it to. Enter Pandoc. I’ve been using Pandoc to convert all of my Word documents — including footnotes — for the last two years. I’ve been delighted with the results.

You can read the docs yourself to determine how to install Pandoc on your own OS and the various options available. The below is the command I use to get my essays into Markdown for use in Hugo.

pandoc -f docx -t markdown lancelot_andrewes.docx -o lancelot_andrewes.md --wrap=none --standalone

Once I have a Markdown file, all that is generally required of me is to add a header to the file for Hugo and then I’m off to the races.