Recently the Pandoc upgrades to Pandoc 2. After struggling with reference for docx in Pandoc, I finally make the workflow elegant. Below is a Makefile that can generate docx from md, where the old docx is used as template. Thus the changed style in the docx is reserved, and you can change the md file to get proper docx file.