Bibtex Bibliography Not Showing Up, No Error

Hi all,

I am trying to make a PDF document using R markdown that contains references using Bibtex. When I knit the markdown file, I get a PDF, but the references section is blank. My yaml heading is as follows:

title: "help_bibliography"
author: "Maria Burzillo"
date: "2/28/2020"
output: bookdown::pdf_document2
bibliography: bib.bib
biblio-style: "apalike"
link_citations: true

My bib.bib file is included in the repo and is as follows:

% Encoding: UTF-8

  title = {knitr: A General-Purpose Package for Dynamic Report
    Generation in R},
  author = {Yihui Xie},
  year = {2020},
  note = {R package version 1.27},
  url = {},
  title = {stringr: Simple, Consistent Wrappers for Common
    String Operations},
  author = {Hadley Wickham},
  year = {2019},
  note = {R package version 1.4.0},
  url = {},
  title = {Dynamic Documents with {R} and knitr},
  author = {Yihui Xie},
  publisher = {Chapman and Hall/CRC},
  address = {Boca Raton, Florida},
  year = {2015},
  edition = {2nd},
  note = {ISBN 978-1498716963},
  url = {},
  booktitle = {Implementing Reproducible Computational
  editor = {Victoria Stodden and Friedrich Leisch and Roger D.
  title = {knitr: A Comprehensive Tool for Reproducible
    Research in {R}},
  author = {Yihui Xie},
  publisher = {Chapman and Hall/CRC},
  year = {2014},
  note = {ISBN 978-1466561595},
  url = {},

I read the answers to the related question on Github and ran the reproducible example on my computer, which worked when the output was the original and also when I set the output to bookdown::pdf_document2, which I need for my project. Any ideas? I have no idea why this isn't working. Thank you!

I didn't realize that you actually had to reference something in the text for it to show up as a reference, so now it is working. Is there a way to have your references show up even if you don't explicitly cite them though? Thanks

Hi there,

For what it's worth, I have done something like this before in LaTeX but not in markdown. My trick was to include all the citations but use a white text colour to turn them effectively invisible in the text.

Maybe that helps.

It's hacky, but here's what I do in the YAML header:

include_uncited: |
  @concord2, @clerc2014, @brenner1996, @bookdown, @datatable, @ggplot2, @ggiraph

I adapted it from the Pandoc documentation. include_uncited is an arbitrary name, picked only because it's unlikely to conflict with what Pandoc or knitr do now or will do. The real trick is that, now, the references are cited somewhere in the document.

Pandoc also lets you include all citations in the bibliography file with a wildcard reference:

nocite: |

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