1

I'm trying to get Pandoc to convert markdown citation keys (e.g. [@xxx]) to full citations (in .odt or .docx) but for some reason it isn't working.

I have the following files in the relevant directory: xxx.md, xxx.bib, xxx.csl. I have pandoc and pandoc-citeproc installed (in Ubuntu).

I run the following command or similar:

pandoc --filter pandoc-citeproc -s -o test.odt xxx.md

The document test.odt is produced, and the markdown is converted appropriately, but the citation keys remain untouched. In the .odt document they still appear as [@xxx] and the #References list is unpopulated. It's like the keys haven't been recognised as citations at all.

The YAML data in my xxx.md file references the .bib and .csl files in the directory. In case it's relevant, the .bib file is generated by exporting from Zotero.

I'm sure I'm making some really basic error with how I use pandoc, but for the life of me I can't work out what it is that I'm doing wrong.

Other similar questions such as this and this don't seem to address the same issue.

Any help would be very gratefully received!

Community
  • 1
  • 1
Owain
  • 11
  • 3
  • I think you need `--bibliography xxx.bib`, see http://pandoc.org/README.html#citation-rendering – mb21 Mar 31 '16 at 08:09
  • Thanks, but I was under the impression that's not needed if the `bibliography` variable is set within the .md document's YAML metadata. I did try the command with the addition of `--bibliography xxx.bib` but the end result was the same. – Owain Mar 31 '16 at 15:16

1 Answers1

0

Actually turned out to be a problem with the .bib file rather than with the installation or use of pandoc.

Owain
  • 11
  • 3
  • Hi, I am having the same problem, I am wondering if you can tell me what exactly is the bib file problem that you encounter? – JoZ Jan 23 '23 at 22:03