Inspired by pandoc-docx-tools. Based on the default DOCX template of Pandoc 3.8.
# Make script executable
chmod +x pandoc-docx.sh
# Generate reference.docx from `reference` folder
./pandoc-docx.sh zip
# Edit reference.docx in Microsoft Word
# Unzip reference.docx to `reference` folder
./pandoc-docx.sh unzip
Use the reference.docx
file as the template:
./pandoc-docx.sh zip && pandoc -o output.docx --reference-doc=reference.docx input.md --number-sections