daaronr / dr-rstuff

Helper files and functions David Reinstein uses across various data projects
0 stars 0 forks source link

get bibliography working with new rstudio Zotero thing #9

Open daaronr opened 3 years ago

daaronr commented 3 years ago

@oskasf What should be put in the index.Rmd file under 'bibliography'? Should it be ...

bibliography: "`r rbbt::bbt_write_bib('support/references.bib', overwrite = TRUE, library_id = rbbt::bbt_libraries()[rbbt::bbt_libraries()$name == 'reinstein_research_and_impact_collabs', 1])`"

I try removing the .bib stuff but it lost the referencing

oskasf commented 3 years ago

@daaronr

Which repo is this? I can take a look now. Effectively this command finds the references that are in each of the .Rmd files and adds them to a .bib file. I think (?) that if we are using the new rstudio plugin it should add these references automatically so it would be a case of just linking the .bib file.

daaronr commented 3 years ago

Thanks. But which .bib file should then be linked? Does it always create the same one named in the same place?

(By the way this was the template repo.)

oskasf commented 3 years ago

@daaronr From my experience it seems to create a file called references.bib. Anyways this is what was specified in the above example. But obviously it'd be possible to link all of them as has been done in some of the index.Rmd files. For example:

bibliography: ["support/reinstein_bibtex_dropbox.bib", "support/reinstein_references.bib", "packages.bib"]

I can't seem to find the line of code in the template files, could you point me towards it?