23

I use Pandoc to convert a tex file to docx. I used the following command

pandoc -s foo.tex --bibliography=foo.bib -o foo.docx 

But in the output word document, citation are in format of (author date), while I want just a number like [1].

1
  • 2
    Pandoc can use any CSL file to format your citations. Please check out the Zotero style repo and download a matching style. Commented Sep 18, 2015 at 20:10

2 Answers 2

24

The solution is to use a CSL file to format the citations. I used ieee.csl from https://github.com/citation-style-language/styles

pandoc -s foo.tex --bibliography=foo.bib --csl=ieee.csl -o foo.docx 
1
  • Sorry this is not at least working for a standard article with a plain bibliography Commented Mar 1, 2024 at 21:00
1

In the 2025 version of pandoc I needed to adjust the command in Ahmads answer. The following worked for me:

pandoc -s foo.tex --bibliography=foo.bib --citeproc --csl=ieee.csl -o foo.docx 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.