3

This should be relatively simple but I can't find a clear answer about how to do it.

I am using the command:

pandoc -s myfile.tex -o outfile.md --bibliography mybib.bib

But outfile.md does not end up having any bibliography. What is going on?

Joshua Meyers
  • 619
  • 1
  • 8
  • 17

1 Answers1

4

The citations extension is on by default. Pandoc tries to produce the cleanest output possible, so it uses @citeid syntax instead of adding full citations when that extension is enabled. Disabling it will to the trick:

pandoc -t markdown-citations -s myfile.tex -o outfile.md --bibliography mybib.bib
tarleb
  • 19,863
  • 4
  • 51
  • 80
  • Thanks! This worked, but why don't I see `markdown-citations` as a possible FORMAT in the documentation, and why doesn't the section you linked to mention this syntax? – Joshua Meyers Jun 18 '20 at 22:38
  • 2
    Different formats support different extensions. You can run `pandoc --list-extensions=markdown` to see the list of extensions supported in Markdown. Those extensions prefixed with `-` are disabled, those with `+` are enabled. So to autolink bare URIs while disabling citations, one would write `-t markdown+autolinks_bar_uris-citations`. See also https://pandoc.org/MANUAL.html#extensions – tarleb Jun 19 '20 at 05:52