I'm using Pandoc v1.12.2.1 to convert html to docx. It's working, generally, but I'm trying to get it to read in a docx template file so I can tell it to use Arial for the font and to make all headings black (instead of blue as they're coming out at the moment).
The template file is at
/path/to/my/project/public/pandoc/templates/reference.docx
and i'm calling Pandoc like this:
pandoc --data-dir /path/to/my/project/public/pandoc --template reference.docx -s "$input" -o "$output"
Where $input and $output are the html file I'm reading in and the destination of the resulting docx file respectively.
It produces a docx file, but it doesn't take my template into account - it looks identical to when I don't use a template file. I think it's reading the reference.docx file, because if I change the filename it complains about it not being there.
To produce the template I followed the instruction on [https://pandoc.org/MANUAL.html#option--reference-doc][1] which was to take a docx file produced by Pandoc, edit the style settings, and then save it.
I've put the template file [here][2] in case anyone can see anything wrong with it.
I'm trying to do this in Ubuntu 14.04, using LibreOffice, and I wonder if that has anything to do with it not working? Do I need to edit the template in Microsoft Word in Windows?
Grateful for any advice.
EDIT - I've also tried this:
pandoc "$input" -s --reference-docx /path/to/my/project/public/pandoc/templates/reference.docx -o "$output"
``
and have the same result: it doesn't seem to use the styles, but it will complain if I change the filename, suggesting that it is reading the doc.
[1]: https://pandoc.org/MANUAL.html#option--reference-doc
[2]: https://www.dropbox.com/s/e4dl9avue1i7vkr/reference.docx?dl=1