Cheat sheet

Convert a Word file into a Markdown file, following the CommonMark standard

pandoc -f docx -t commonmark --wrap=none -o ~/Desktop/ ~/Desktop/input.docx

Convert multiple Word files in a folder in a standalone Markdown file

pandoc *.docx -f docx -t commonmark --wrap=none -s -o ~/Desktop/
pandoc *.md -f commonmark -t odt -s -o ~/Desktop/output.odt
Replace commonmark with commonmark_x to have more features. See the list of supported markdown variants.

convert all files in a folder

for f in *.docx; do pandoc "$f" -f docx -t commonmark --wrap=none -s -o "$f".md; done

!Academic writing with Pandoc

To learn

  • understanding conversion engines, mactex, latex, etc.
  • CSS styling
  • Wikilinks removal or parsing