andras-simonyi / citeproc-el

A CSL 1.0.2 Citation Processor for Emacs.
GNU General Public License v3.0
85 stars 9 forks source link

Initial nocite support #47

Closed andras-simonyi closed 3 years ago

andras-simonyi commented 3 years ago

Adds nocite support with the crucial limitation that disambiguation treats all items as if they were cited.

denismaier commented 3 years ago

crucial limitation that disambiguation treats all items as if they were cited.

What's the implications of this? Any downsides?

andras-simonyi commented 3 years ago

I guess the only downside is possibly having some superfluous disambiguating elements in the bibliography, e.g., unnecessary year suffixes.

denismaier commented 3 years ago

I guess the only downside is possibly having some superfluous disambiguating elements in the bibliography, e.g., unnecessary year suffixes.

Not sure if this is even really a downside... If I had to choose between

Doe. 2020. A title added via nocite. Doe. 2020a. A regularly cited title.

and

Doe. 2020a. A title added via nocite. Doe. 2020b. A regularly cited title.

I'd opt for the second variant.

andras-simonyi commented 3 years ago

What I meant was rather having

Doe. 2020a. A title added via nocite. Doe. 2020b. A regularly cited title.

in the bibliography even if neither of them is actually cited. (So both year suffixes are superfluous.)

denismaier commented 3 years ago

(So both year suffixes are superfluous.)

Technically yes, but for the sake of consistency I'd still prefer this.

andras-simonyi commented 3 years ago

(So both year suffixes are superfluous.)

Technically yes, but for the sake of consistency I'd still prefer this.

This is an interesting point and raises an issue: I've just checked biblatex-chicago and it generates the year suffixes for nocites as well. My original plan was to extend the disambiguation algorithm to deal with the difference between uncited and cited items in the bibliography, but it would be good news if that turned out to be unnecessary because of "aesthetic reasons". Maybe @bdarcus can comment in the issue?

bdarcus commented 3 years ago

Maybe it's fine as is?

Here's my tentative thinking:

Disambiguation is of the targets, the items printed in the bibliography, not the citation references.

Therefore whether the latter is printed or not is irrelevant.

I realize the citation looks slightly odd if there's only one cited, and you get (Doe, 2019b), but the flip side is the bibliography list looks right.

If you added the reverse, nobib, then it would necessarily impact disambiguation.

Does that make sense?

If yes, maybe keep as is for now and see how people respond?

denismaier commented 3 years ago

Maybe it's fine as is?

Here's my tentative thinking:

Disambiguation is of the targets, the items printed in the bibliography, not the citation references.

Therefore whether the latter is printed or not is irrelevant.

I realize the citation looks slightly odd if there's only one cited, and you get (Doe, 2019b}, but the flip side is the bibliography list looks right.

That was my line of thought as well. FWIW, I think readers shouldn't be expected to know which works were actually cited in a document.

andras-simonyi commented 3 years ago

Thanks, in view of your comments I won't change the disambiguation behavior for uncited items, at least in the absence of complaints. Just for the record, my main worry was not getting (Doe, 2019b) when only one is cited, but getting something like

Doe, John. 2019a. Magnum opus.
Doe, John. 2019b. Minor work.

in the bibliography when none of Doe's works from 2019 is actually cited.

denismaier commented 3 years ago

Just for the record, my main worry was not getting (Doe, 2019b) when only one is cited, but getting something like

Doe, John. 2019a. Magnum opus.
Doe, John. 2019b. Minor work.

in the bibliography when none of Doe's works from 2019 is actually cited.

I see. FWIW, I've just tested and this is also what Zotero/citeproc-js produces. So, at least we're consistent here.

andras-simonyi commented 3 years ago

I see. FWIW, I've just tested and this is also what Zotero/citeproc-js produces. So, at least we're consistent here.

Thanks! I tested it with biblatex-chicago too and got the same result. I'm still not totally convinced that this is the most desirable behavior but it's definitely simpler to implement :-).