crsh / citr

RStudio Addin to Insert Markdown Citations
Other
408 stars 46 forks source link

Updating local bibliography file #16

Open mbojan opened 7 years ago

mbojan commented 7 years ago

It is often the case that bibliographic information needs updating because of typos, first names as initials rather then in full, etc. Currently bibliographic entries are added to the local .bib file when the reference is inserted in the text. It would be best to make such updates in Zotero (as a master source) and then update the relevant entry in the local .bib file.

Would it be feasible to have a function that looks at the local .bib file and "refreshes" the entries from Zotero?

crsh commented 7 years ago

Hi Michał, thanks for reaching out. This is a great point. Unfortunately, I don't think I'll have time to implement this any time soon, but I'll definitely keep this in mind. I have run into this issue several times myself. I'd also be happy to review a pull request that implements such a function. :wink:

ashirwad commented 4 years ago

@crsh, any updates on this feature?

crsh commented 4 years ago

I have put this on hold (see related discussion: https://github.com/crsh/citr/issues/39) because I'm currently working on a new way to implement the integration with Zotero that should hopefully address this problem. In the mean time, I think you best bet is to export the entire Zotero bibliography to a bib-file and run tidy_bib_file() on it. Be sure to use the latest GitHub version of citr though.

ashirwad commented 4 years ago

First of all, thanks a lot for creating this add-in! It greatly simplifies the process of adding citations in Rmarkdown files.

Also, after I asked you for the updates, I played a little with Zotero and found that you can export a Zotero collection (I am thinking of making one collection per paper that can be nested within a project) as a *.bib file with auto sync option enabled and place it in the same folder where the main *.Rmd file is. Then, add the bibliography: "*.bib" line in the YAML of the main *.Rmd file.

I am thinking of going this route as Connect and load libraries option for the Zotero integration will fetch the entire library, which I don't need when I am writing a specific paper, and make the citation process a little slower (or considerably slower?) as the library grows over time.

Note: I installed the Better BibTeX for Zotero as per your README file from here: http://retorque.re/zotero-better-bibtex/ before exporting the collection as shown in the following gif file.

zotero-export-with-sync

crsh commented 4 years ago

That sounds like a reasonable approach, thanks for sharing. :+1: