R Markdown not showing bibliography

R Markdown doesn't show the Bibliography correctly. This is the code I am using in R Markdown

output:
  pdf_document: default
  html_document: default
  bibliography: bibliography.bib
  word_document: default
---

When knitting the file as PDF it shows like this @Manual (which is the way i have typed it in the R markdown file)
This is what the bib file contains:

@Manual{anderson2015,
title = {Exhumation by debris flows in the 2013 Colorado Front Range storm},
author = { S.W. Anderson and S.P. Anderson and R.S Anderson},
journal = {Geology},
year = {2015},
pages = {31,94},
url = {https://www.R-project.org/},
}

Can anyone advise, please? Thanks

I think you should mind the indentation. bibliography should be as the same level as output as it is a PANDOC option

output:
  pdf_document: default
  html_document: default
  word_document: default
bibliography: bibliography.bib

see also :
https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html

2 Likes

In addition to writing your YAML as cderv says, you have to write the citations like this [@anderson2015] (i.e. the citation identifier from the bib file that corresponds to @Manual)

3 Likes

Thanks for you both.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.