I am working to convert a LaTeX document to word (because that's what the journal requires) and to avoid rewritting all of the equations and citations I want to use pandoc, but pandoc doesn't seem to handle the bibliography correctly. Is there a way to partially compile a latex file such that the bibliograpy is put at the bottom with bibitem labels? I would love it if I could easily get the dmath sections replaced with equation arrays as well.

  • You are probably not going to find much sympathy on this site (I can't understand why you would want to do this myself:). I'm sure that you have your reasons, however, so try these: latex-to-word, tex to docx with references – Andrew Jun 25 '14 at 18:17
  • 1
    Thanks, Andrew. I really don't want to do this, but I am submitting to a journal that requires word format. It is painful. – Craig Jun 25 '14 at 20:17
  • Can you add what you've already tried? pandoc blah.md -o blah.doc --bibliography=citations.bib works fine for me for the bibiliography. Images don't seem to work though. – naught101 Sep 1 '15 at 5:39

Andrew's suggestion to look at latex-to-word again helped me get it all working. I didn't find a way to do a partial compile. But in the previous question there is a bulleted list of things to check when using pandoc.

I first had to also install pandoc-citeproc in order to handle the bibtex citations and to download the *.csl file for the corresponding *.bst from this site.

Then I simply replaced all of the dmath equations with equation (and it works reasonably well) and removed any characters that don't work with pandoc from the equations. In my case it was \bm \\ and I also had to replace TeX \defs with \newcommands.

I also removed all the figures and tables, since the journal doesn't want them in the word document anyways.

The command I then used to execute was:

pandoc -o word.docx --bibliography trimmed.bib --csl elsarticle-harv.csl original.tex

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.