Enrique
Enrique

Reputation: 10137

Issue when adding BibTex entries to .bib file

I am using RStudio and the R package bookdown. I am having issues when trying to add a new bibtex entry to a .bib file.

In my index.Rmd I have the following line:

bibliography: [book.bib, packages.bib]

I added a new entry to packages.bib and then I built the book with the "Build Book" button in RStudio (I tried HTML and PDF). When opening the book in html or pdf, the citation looks like "???". When I close packages.bib and open it again, the entry that I added is not there anymore. Furthermore, when I make a change to any of the .bib files (just adding a space) and then saving the following error is displayed:

Error in if (config$output_dir != ".") exclude <- c(exclude, config$output_dir) : 
  argument is of length zero

I tried cleaning the project and building it again but that did not solve the problem.

Versions:

Upvotes: 1

Views: 351

Answers (1)

Ralf Stubner
Ralf Stubner

Reputation: 26843

In the default bookdown project the file packages.bib is dynamically created to contain citation information for the specified R packages only. Use book.bib for adding BibTeX entries by hand.

Upvotes: 2

Related Questions