I'm using the rticles package to write an article for the R Journal using the template. I wanted to enable bookdown cross-references so here is my output format in my YAML:
output:
  bookdown::pdf_book:
    base_format: rticles::rjournal_article
The template created a bibliography file named RJreferences.bib in the project root directory, which is fine. I can knit my document with my references in there. But I would like to layer another .bib file, and cannot figure out how to do this. If I add this to my YAML:
bibliography: RJreferences.bib
I get an error message that seems to boil down to this:
Illegal, another \bibdata command---line 77 of file RJwrapper.aux
 : \bibdata
 :         {RJreferences.bib}
I'm skipping whatever remains of this command
Database file #1: RJreferences.bib
Is there a way to have multiple .bib files in this kind of project? My specific use case is that I'd like to use knitr to create a .bib file with all the packages used in the paper automatically, like this:
knitr::write_bib(.packages(), "packages.bib") 
Then use two .bib files following my own tutorial from the blogdown package ( ) here:
) here:
https://blogdown-demo.rbind.io/2017/08/28/adding-citations-to-posts/
So ideally I was after:
---
bibliography: [RJreferences.bib, packages.bib]
---

