Sunday, October 29, 2023

Converting LaTeX to Word (docx)

I write my papers in LyX, which can easily produce a LaTeX file. (Indeed, LyX uses LaTeX as a backend when producing PDFs.) But most journals want a Word file or something of the sort. Well, it's John MacFarlane's pandoc to the rescue. Here's how to do it:

  1. Get yourself a LaTeX file.
  2. Use pandoc to convert to a docx file:
    • pandoc -o output.docx --citeproc --bibliography mybib.bib input.tex

The --citeproc option tells pandoc to produce a bibliography. The --bibliogrpaphy option tells pandoc where to find citation information. This can be used multiple times if you have multiple bib files, but it's easier to use aux2bib to create a local bib file with just the citations in that document.

No comments:

Post a Comment

Comments welcome, but they are expected to be civil.
Please don't bother spamming me. I'm only going to delete it.