typst / hayagriva

Rusty bibliography management.
Apache License 2.0
337 stars 54 forks source link

CSL: et-al-subsequent-min and et-al-subsequent-use-first not respected #111

Closed ignitedPotato closed 4 weeks ago

ignitedPotato commented 11 months ago

Description

When using CSL files that specify usage of "et al" only for subsequent citations, shortening of citations never happens.

Example bib:

@book{baduraZeitenwendeArbeitGesund2023,
  title = {{Zeitenwende - Arbeit gesund gestalten}},
  editor = {Badura, Bernhard and Ducki, Antje and Meyer, Markus and Baumgardt, Johanna and Schr{\"o}der, Helmut},
  year = {2023},
  series = {{Fehlzeiten-Report}},
  number = {2023},
  publisher = {{Springer Berlin}},
  address = {{Berlin}},
  isbn = {978-3-662-67514-4 978-3-662-67513-7},
  langid = {german}
}

Example Text:

#lorem(20) @baduraZeitenwendeArbeitGesund2023[S. 437]
#v(1em)
#lorem(30) @baduraZeitenwendeArbeitGesund2023[S. 437]

Bib style is deutsche-gesellschaft-fur-psychologie.csl which includes et-al-subsequent-min and et-al-subsequent-use-first directives:

citation et-al-min="6" et-al-use-first="1" et-al-subsequent-min="3" et-al-subsequent-use-first="1"

But output is:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magnam aliquam quaerat. (Badura, Ducki, Meyer, Baumgardt & Schröder, 2023, S. 437)

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim aeque doleamus animo, cum corpore dolemus, fieri. (Badura, Ducki, Meyer, Baumgardt & Schröder, 2023, S. 437)

Expected output:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magnam aliquam quaerat. (Badura, Ducki, Meyer, Baumgardt & Schröder, 2023, S. 437)

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim aeque doleamus animo, cum corpore dolemus, fieri. (Badura et al., 2023, S. 437)

Reproduction URL

No response

Operating system

Web app

Typst version

nps1ngh commented 6 months ago

Hi,

what else needs to be done to fix this? It seems that https://github.com/typst/citationberg/pull/3 alone is insufficient. Would love to help, where I can :smiley:

I checked as follows: https://github.com/typst/citationberg/pull/3 is included in citationberg 0.3.0 (corresponding commit) hayagriva 0.5.2 depends on citationberg 0.3.0 (Cargo.toml) typst 0.11.0 depends on hayagriva 0.5.2 (Cargo.toml)

EDIT: Seems to work in typst 0.11.1 :smile: