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

When citing multiple articles and using a modifier, only the first article gets the modifier #61

Closed mbosley closed 2 years ago

mbosley commented 2 years ago

Hi there, thanks for your work on this package!

My expectation for a citation of the form: [cite/t:@albertConstitutionalHandcuffs2010;@albertAmendingConstitutionalAmendment2015] is this, which I get when I export using natbib's apalike. Screen Shot 2021-10-18 at 9 26 02 AM

However, when exporting with CSL using the citeproc engine, I get this:

Screen Shot 2021-10-18 at 9 27 16 AM

bdarcus commented 2 years ago

Is it possible the issue is the style?

CSL has rules for sorting of citations, and the configuration of the bib structures how the "b" suffix gets created.

Maybe try a couple of different CSL styles for comparison, and include the style links?

mbosley commented 2 years ago

Same problem persists across all styles when using the CSL engine; conversely, output is correct and as expected across a variety of natbib export styles.

bdarcus commented 2 years ago

Is the problem the disambiguation suffix (should be "a"), the reference sorting within the citation, or both?

I don't do any development here; but I'm sure @andras-simonyi will ask :-)

mbosley commented 2 years ago

The disambiguation suffix is a minor concern, but the major concern is that using CSL, I get "Albert (Albert, 2015b, 2010)", which is not the intended output (w.r.t. the doubling up of the name). There should be no second "Albert" within the parentheses.

bdarcus commented 2 years ago

Sorry for the noise; I obviously missed that!

So for some reason, the "text" style isn't working correctly there.

I've not seen that behavior myself.

mbosley commented 2 years ago

Fwiw, I am running with your working config for your Doom pull request. But I do think that this has to do with how citeproc handles things, since everything works as intended with natbib.

bdarcus commented 2 years ago

You might want to post a MWE, with the data file that includes those two references (even if it always happens)?

bdarcus commented 2 years ago

Other issue: might it be that you're version of org isn't up-to-date?

I believe the version pinned last for doom doesn't include the recent enhancements. Among the reason I have the note the Henrik to bump org.

Also possible someone bumped it more recently; am not sure.

andras-simonyi commented 2 years ago

Thanks for the report! As @bdarcus wrote (thanks!), a minimal working example (a small Org file + corresponding bibliography) would be very useful.

bdarcus commented 2 years ago

13 days ago.

https://github.com/hlissner/doom-emacs/commit/e3d4e05fbd53c6c438cea3c0477f70fff954117c

andras-simonyi commented 2 years ago

BTW, I tried to reproduce the problem but with Chicago author-date I seem to get the correct result.

mbosley commented 2 years ago

BTW, I tried to reproduce the problem but with Chicago author-date I seem to get the correct result.

I just checked with Chicago author-date as well, and it works! With apa.csl or apalike.csl from https://github.com/citation-style-language/styles, it doesn't work properly though.

andras-simonyi commented 2 years ago

Indeed, with apa.csl I see the same result! I have to investigate what causes the erratic behavior when using these styles.

andras-simonyi commented 2 years ago

I've just merged a pull request which hopefully solves the problem. Could you check?

mbosley commented 2 years ago

I've just merged a pull request which hopefully solves the problem. Could you check?

Looks like it works now. Thanks for this!