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 unzipUse the reference.docx file as the template:
./pandoc-docx.sh zip && pandoc -o test.docx --reference-doc=reference.docx test.md --number-sections