title: Markdown to docx, including complex template
body: <p>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:</p>
  
  <pre><code>pandoc -f markdown -t docx --data-dir=docs/rendering/ mydoc.md -o mydoc.docx
  </code></pre>
  
  <p>The <code>reference.docx</code> is picked up by Pandoc from <code>docs/rendering</code> and Pandoc renders <code>mydoc.docx</code> with the same styles as the reference doc.</p>
  
  <p>However, <code>reference.docx</code> contains more than just styles. It contains coporate logos, preamble, etc.</p>
  
  <p>How can I automate the merging of the Markdown content with both the styles and content of <code>reference.docx</code>. My solution needs to work on Linux.</p>