For unfortunate reasons, I need to convert a latex document to word. The document was created using an ACM template (available here); I've read bread thing about pandoc and I was hoping to use it to handle the conversion.
I quickly fired up my terminal, installed pandoc via homebrew (OS X user here) and downloaded the template (see link above) to test the conversion process. However, despite many trials and extensive googling, I still can't figure out how to tell pandoc to use the provided template (provided as .cls file) to render the document correctly.
I've tried to run:
pandoc -f latex -t docx sig-alternate.tex --biblatex --bibliography sigproc.bib -o sig-alternate.docx
here's a side by side comparison between the .docx generated by pandoc and the pdf generated via MacTeX:
I'm clearly missing some step(s) here. Can someone enlighten me? Thanks!
Best Answer
Pandoc cannot use a template provided as a *.csl file to style its DOCX output.
If you want to get Pandoc using a specific set of styles, you need to create (or grab) another DOCX file containing these styles. Note, that the style names do need to conform to the standard names in the first place. (In the past I've succeeded to let it use non-standard style names in cases where one of the standard styles is set up to enforce another style, f.e. in "next paragraph"..).
The commandline option to add is
--reference-docx=...
Also, be sure to use the very latest version of Pandoc. Its support for DOCX is very new, and evolving still very rapidly.
The command for Pandoc would be:
One other hint: if the direct conversion is not satisfying you (there may be spots where the thing doesn't look right), you should proceed like this:
man pandoc_markdown
andman pandoc
to see what special options and extensions Pandoc supports).--reference-docx=...
)