I am trying to convert a tex file to docx using pandoc. The tex file contains a bibliography, which is in an external file, named mybib.bib, but located in the same folder of the main document. The package pandoc-citeproc has been installed with pandoc. I type in the cmd terminal:

pandoc -s main.tex bibliography=mybib.bib -o main.docx

However, the bibliography is not converted in the docx file. Do you have an idea why this happens?

Thanks in advance


1 Answer 1


You also need to tell pandoc to use pandoc-citeproc. For recent versions (>= 2.11) of pandoc you need to use the option --citeproc:

pandoc -s main.tex --citeproc --bibliography=mybib.bib -o main.docx    

Elder versions use pandoc-citeproc as a filter:

pandoc -s main.tex --filter=pandoc-citeproc --bibliography=mybib.bib -o main.docx  

This is documented in pandoc's manual

  • Thanks for your reply. I tried as you suggested and I got: pandoc.exe: bibliography=mybib.bib: openBinaryFile: does not exist (No such file or directory). But the file mybib.bib is in that directory. Am I missing something elese?
    – Dario
    Oct 31, 2020 at 16:59
  • Just seeing it now, you've got the option wrong: It must be --bibliography=mybib.bib not bibliography=mybib.bib
    – DG'
    Oct 31, 2020 at 17:47
  • Thank you very much, It worked. Just out of curiosity. I tried to make the conversion from a folder that is located in Onedrive and the procedure gave me a blanck document. I had to move the file into another folder (out of a cloud) and it worked (thanks to your suggestions obviously). Do you have an idea about the reason of that? Thanks again.
    – Dario
    Oct 31, 2020 at 21:08
  • Sorry, I have no experience with OneDrive at all
    – DG'
    Oct 31, 2020 at 22:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .