skip to content

Convert LaTeX Document to Word

1 min read

# latex
# word
Not in series

Recently, I encountered a problem while writing my paper: I use LaTeX to write it, but my advisor only uses Word. So a natural need is to convert a paper from LaTeX to Word.

I know I can do this with pandoc, but to achieve the best effect, I need to configure something more.

First, I use

pandoc main.tex --from=latex --to=docx --output=main.docx --bibliography=ref.bib --csl=https://www.zotero.org/styles/ieee --citeproc
  • --bibliography: my references;
  • --csl: style of citation;
  • --citeproc: enable citation processing so that Pandoc converts \cite{} and similar commands into fields recognizable in Word.

but I found there’s no abstract and because I use \abstract{} command instead of \begin{abstract} ... \end{abstract}.

To resolve this, I need to switch \abstract{} to \begin{abstract} ... \end{abstract}.

But, there’s still a problem: the word doc lost the ability to navigate by clicking hyperlinks, that is because LaTeX use its tag system while Word rely on the field codes.

I asked ChatGPT, it tells me to use command below:

pandoc main.tex --from=latex --to=docx --output=main.docx --bibliography=ref.bib --csl=https://www.zotero.org/styles/ieee --citeproc --metadata link-citations=true  --toc

this time, it works while.