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 toProjectPath/analysis/paper/references.bib
but I have not succeeded. This may be the best solution--changingcitr
or me figuring out how to do this properly. - I've set
bibliography: ../../references.bib
inpaper.Rmd
but thencitr
wants to add new citations to parent directories ofProjectPath
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 singlereferences.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 toProjectPath/references.bib
inProjectPath/analysis/paper/references-hard-link.bib
?
- If
After noting this "problem" on multiple packages, I currently can't reliably reproduce the "problem". I'll close until I can do so.