2

I need to convert a .tex file to .docx and I am trying to use pandoc for the first time. I manage to convert but the bibliography is missing and the citations do not appear. The tex file contains an external bibliography reference.bib located in the same folder of the file I want to convert.

I have tried the commands below to convert, but none of them worked:

pandoc -s JEEQ-D-21-00161R1.tex -o JEEQ-D-21-00161R1.docx --bibliography=reference.bib

pandoc -s JEEQ-D-21-00161R1.tex -o JEEQ-D-21-00161R1.docx --bibliography=/Users/maykelboldrinbelluzi/Documents/pandoc-test/reference.bibtex

pandoc --bibliography reference.bib --filter pandoc-citeproc -o JEEQ-D-21-00161R1.docx JEEQ-D-21-00161R1.tex

I don't know if or how to install the package pandoc-citeproc. I type in the cmd terminal and everytime I type the command with pandoc-citeproc it returns a message

[WARNING] Deprecated: pandoc-citeproc filter. Use --citeproc instead. Error running filter pandoc-citeproc: Could not find executable pandoc-citeproc

Do you guys have an idea why this happens?

1 Answer 1

7

Add the --citeproc option (ps: next time provide a minimal working example):

pandoc --bibliography=myrefs.bib --citeproc -o output.docx input.tex

enter image description here

\documentclass{article}

\begin{filecontents}{myrefs.bib}
@Book{Knuth:1990,
    author    = {Knuth, Donald E.},
    title     = {The {\TeX}book},
    year      = {1990},
    isbn      = {0-201-13447-0},
    publisher = {Addison\,\textendash\,Wesley},
}

@Book{Lamport:94,
    author    = {Lamport, Leslie},
    title     = {\LaTeX: A Document Preparation System},
    year      = {1994},
    isbn      = {0-021-52983-1},
    publisher = {Addison\,\textendash\,Wesley},
}
\end{filecontents}

\begin{document}

\section{Main Body}
{\LaTeX} is aTuring-complete (procedural) markup language and typesetting processor~\cite{Lamport:94}.

\bibliographystyle{alpha}
\bibliography{myrefs}
\end{document}

You must log in to answer this question.

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