benmarwick/rrtools

Discussion: Use YAML `bibliography: [references.bib, ../../references.bib]`

ntrlshrp opened this issue · 1 comments

This is rather minor, but I'm curious what better heads think.

Is your feature request related to a problem? Please describe.
I use the R package, citr, to do my citations--in part, because it nicely collects them from Zotero for me to choose from when adding to paper.Rmd. When I add a citation to paper.Rmd, citr adds the citation to ProjectPath/references.bib when it sees bibliography: references.bib in the YAML.

Of course, paper.Rmd knits with another path, ProjectPath/analysis/paper/references.bib, which has not received biblographic references from citr. I can't figure out how to make citr and rrtools work together without bibliography: [references.bib, ../../references.bib] in the YAML.

Describe the solution you'd like
I want to easily use citr with my rrtools papers. This of course may place me among a very small minority of users.

Describe alternatives you've considered

  • I've tried to tell citr (via the "Settings" in the Shiny popup) that I want to add citations to ProjectPath/analysis/paper/references.bib but I have not succeeded. This may be the best solution--changing citr or me figuring out how to do this properly.
  • I've set bibliography: ../../references.bib in paper.Rmd but then citr wants to add new citations to parent directories of ProjectPath

Additional context

  • A side benefit of making ProjectPath/references.bib the location for references is that one might have multiple documents under the same project that could all rely on a single references.bib (e.g., one's research diary, communications, meeting minutes, etc.)
  • A required change would be to add references.bib to .Rbuildignore for CRAN checks.
    • If references.bib content needs to be part of the build, maybe it's possible to place a hard-link to ProjectPath/references.bib in ProjectPath/analysis/paper/references-hard-link.bib?

After noting this "problem" on multiple packages, I currently can't reliably reproduce the "problem". I'll close until I can do so.