Cheat sheet

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

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

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

pandoc *.docx -f docx -t commonmark_x --wrap=none -s -o ~/Desktop/
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