retorquere / zotero-better-bibtex

Make Zotero effective for us LaTeX holdouts
https://retorque.re/zotero-better-bibtex/
MIT License
5.39k stars 290 forks source link

Different computers generate different citation keys for same items in shared library #3019

Open samuelmehr opened 1 month ago

samuelmehr commented 1 month ago

Debug log ID

6FSQG35P-refs-apse/6.7.240-7

What happened?

Hi, we use Zotero+BBT with R Markdown to write manuscripts in my lab and have run into an issue where Zotero instances from different users, and also the same user with multiple instances of Zotero (e.g. on their laptop and on their desktop), generate different citation keys for items in the same shared library.

For example, I just tested this with two machines using the same shared library. Both machines are using auth+year citation keys, but three items on one computer have the keys Mehr2017, Mehr2017a, Mehr2017b, respectively, and on the other, they have Mehr2017a, Mehr2017b, Mehr2017c. Both machines have "Keep keys unique within each library" selected.

We tried playing with different auth + year formulae (like auth.fold + year or auth.capitalize + year) and this didn't seem to affect the citation keys.

This is an issue because on a collaborative R Markdown manuscript, multiple users may generate new .bib files and if their citation keys are inconsistent, either an existing citation key will fail to knit properly, or worse, it will knit with the wrong item cited (which we might not notice in the reflist).

Are we doing something wrong here?

retorquere commented 1 month ago

No, until Zotero adds a citation key field citation keys are local to the installation of Zotero they're generated on; if you want syncable keys, right now your only option is to enable auto-pin, which will write the keys into the extra field, and that syncs. BBT always prefers the key in the extra field.

retorquere commented 1 month ago

does this address your question?