Search code examples
markdownwikipandoc

Use .bib file to add bibliography to markdown document


I would like to add references to a github wiki from a .bib file. So I need to produce a markdown file with the embedded bibliography.

I usually convert markdown + .bib to pdf, html or doc using pandoc. For example:

pandoc test.md --bibliography allBib.bib -t markdown -o out.html

Is it possible to output a file that correspond to the input markdown file with the references replaced from the .bib file?

I tried

pandoc Experimental-notes.md --bibliography ../allBib.bib -t markdown -o out.md

but the resulting markdown file is not changed and does not contain the references.


Solution

  • From this answer: you need to remove the citations extension from the output format.

    pandoc Experimental-notes.md -t markdown-citations -o out.md --bibliography ../allBib.bib