Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add ability for tidy_bib_file() to scan _bookdown.yml #87

Open
shirdekel opened this issue Apr 7, 2021 · 1 comment
Open

Add ability for tidy_bib_file() to scan _bookdown.yml #87

shirdekel opened this issue Apr 7, 2021 · 1 comment

Comments

@shirdekel
Copy link

Is your feature request related to a problem? Please describe.
I'm working on a bookdown project, so I have multiple Rmds with citations. I'd like to import a messy central .bib file for all of these, and then clean it using tidy_bib_file().

Describe the solution you'd like
I'd imagine that the solution would be that a call of tidy_bib_file() on index.Rmd would look up all the child documents through _bookdown.yml, and then apply tidy_bib_file() to each.

Describe alternatives you've considered
Keeping an updated .bib file through Zotero from specific collections and manually removing entries when I remove them in the text.

Additional context
This is all in the context of a PhD thesis. I'd like to either end up with one clean references.bib, or maybe separate chapter_1.bib, chapter_2.bib, etc. files if I end up converting them into articles. But I think ultimately, a central .bib file from all Zotero entries that is subsequently tidied would work best for the most contexts.

@shirdekel
Copy link
Author

Since rmd_file can be a vector, perhaps the function could optionally (or automatically upon finding a _bookdown.yml file) feed the result of yaml::read_yaml("_bookdown.yml")[["rmd_files"]] into rmd_file. This will gets the relevant rmd files (In the future there might be an exported function for this from bookdown, see rstudio/bookdown#1090).

@shirdekel shirdekel changed the title Add ability for tidy_bib_file() to scan child documents Add ability for tidy_bib_file() to scan _bookdown.yml Apr 7, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant