[Tex/LaTex] How to generate a bibliography with pandoc

bibliographiesbibtexcitingpandoc

How can I generate a bibliography with pandoc?

If I have this test.md file:

# Test

This is a test [@doe1905].

# Bibliography

How can I generate the bibliography with this bibtex reference:

@article{doe1905,
 author={Doe, John},
 title={Title},
 journal={Journal},
 year={1905},
}

I have tried to add it to test.bib and run pandoc with pandoc --bibliography=test.bib -o test.pdf test.md but that did not create a bibliography in the resulting test.pdf.

Running pandoc --bibliography=test.bib -o test.tex test.md gives me this, where the bibliography seems to be included:

\hypertarget{test}{%
\section{Test}\label{test}}

This is a test {[}@doe1905{]}.

\hypertarget{bibliography}{%
\section{Bibliography}\label{bibliography}}

Solution:

I was able to generate the bibliography by adding –citeproc:

pandoc --bibliography=test.bib --citeproc -o test.pdf test.md

Best Answer

I was able to generate the bibliography by adding --citeproc:

pandoc --bibliography=test.bib --citeproc -o test.pdf test.md

Related Question