retorquere / zotero-better-bibtex

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

Disambiguation of bibtex keys #444

Closed joernwilms closed 4 years ago

joernwilms commented 8 years ago

Hi,

thanks a lot for better bibtex, which makes zotero useful ;-). I have a small little feature request rather than an error: I have a slight (psychological) problem with the bibtex keys generated by better bibtex, in the sense that the disambiguation results in somewhat illogical bibtex keys. What I mean is that I have set my key format to

This results in keys

smith:2011 smith:2011a smith:2011b

etc. Is there a way to start with the character appended to the year already for the first paper of an author for that year? I.e. I would like the above sequence to be

smith:2011a smith:2011b smith:2011c

This would be more logical to me, since I read the labels in my publications to mean that smith:2011a is the first publication by that person in the year, smith:2011b the second, etc. (the current approach confuses the hell out of me for my own publications and the ones I cite often, since I know the sequence in which they were submitted).

Thanks a lot again for this great piece of software!

retorquere commented 8 years ago

It's not impossible in principle, but consider this scenario:

  1. you add a paper by Smith from 2011 (gets key smith:2011), and by Jones from the same year (gets key jones:2011). You cite both
  2. you add a new paper by Smith from the same year. This gets smith2011a

If at step 1. I would have given them citekeys smith:2011a and jones:2011a that looks weird (and ugly, if you ask me). There's nothing to disambiguate, so why add the postfix?

If I'd do business as usual in step 1, but in step 2 change smith:2011 to smith:2011a before handing out smith:2011b, you have a broken reference in one of your papers. It could even be a different paper.

One of the major premises of BBT is that keys are dependable, so 2. is not an option. But to implement 1., keys would always get a postfix, even where not required. If that's what you actually want (always), I can think about how that would be achieved without disrupting the existing key generation, but it won't be the default.

joernwilms commented 8 years ago

Hi,

thanks for the fast reply. Yes, I always want the postfix added. I know that at first this sounds weird, but the reason is that I would estimate that 95% of all of my bibkeys need to be disambiguated - I'm talking about a database with about 3000 entries here and in my field it is fairly typical that people have more than one first author publication per year. This means that in the end almost all bibkeys end up having a postfix. So it makes more sense to always have a postfix rather than having one random article per year for each author not to have a postfix.

I guess I am biased by the citation culture in my field where you would cite two papers of the same author which were published in the same year as Smith et al. (2011a) and Smith et al. (2011b), rather than Smith et al. (2011) and Smith et al. (2011a).

retorquere commented 8 years ago

That is fairly common I think, but not that you'd also get Jones (2011a) absent any other papers from Jones.

In any case, you can give https://s3.eu-central-1.amazonaws.com/zotplus-builds/zotero-better-bibtex-1.6.34-travis-2427.xpi a spin if you want. After installation, you will have to go into about:config, set citekeyAlwaysPostfix to true, and restart Firefox. OSX is particularly stubborn about keeping apps running even when you've closed the last window. This setting is only read out on startup for performance reasons (the key generation gets called often) so any time you change it you will have to restart.

retorquere commented 8 years ago

(btw, if you are looking for consistency between citation key and citation, if you cite only smith:2001a and smith:2001c, you're going to get Smith (2001a) and Smith (2001b) in your paper -- no way around that)

retorquere commented 8 years ago

(or even: if you cite only smith:2001c and smith:2001d, you're going to get Smith (2001a) and Smith (2001b) in your paper)

retorquere commented 8 years ago

I can merge if this does what you want.

retorquere commented 8 years ago

assuming fixed to satisfaction

franvillamil commented 4 years ago

Coming back to this issue. I also encountered this problem, but rather because of not liking the BBT format, it is because I just migrated from BibDesk, where the format of my keys was Author:Yearaa, always with two postfixes, e.g.: Smith:1990aa, Smith:1993aa, Smith:1993ab, etc.

Is there a way to force this format in BBT in order not to change all my .tex files?

Thanks!

retorquere commented 4 years ago

Jeez, how many papers by that one author do you cite? 😆

Can you join #1554?

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.