I have automated my build to convert Markdown files to DOCX files using Pandoc. I have even used a reference document for the final document's styling. The command I use is:
pandoc -f markdown -t docx --data-dir=docs/rendering/ mydoc.md -o mydoc.docx
The reference.docx
is picked up by Pandoc from docs/rendering
and Pandoc renders mydoc.docx
with the same styles as the reference doc.
However, reference.docx
contains more than just styles. It contains coporate logos, preamble, etc.
How can I automate the merging of the Markdown content with both the styles and content of reference.docx
. My solution needs to work on Linux.