typst / hayagriva

Rusty bibliography management.
Apache License 2.0
320 stars 48 forks source link

Et-al handling in `ieee` citation style #164

Open drupol opened 6 months ago

drupol commented 6 months ago

Description

Hello,

In the reference guide of the ieee citation style, I noticed the following in page 4:

NOTE: Use “et al.” when three or more names are given for a reference cited in the text.

The et al. replacement doesn't work in Typst. To illustrate that, I've created a simple page listing all the citation styles at : https://typst.app/project/pQH6zuFPPL_G4NlIOLx9K-

We can notice that in the IEEE style where there's more than 3 authors, the et al. is not displayed. Here's a screenshot:

image

Reproduction URL

https://typst.app/project/pQH6zuFPPL_G4NlIOLx9K-

Operating system

Linux

Typst version

Enivex commented 6 months ago

I suspect this may be the same issue as https://github.com/typst/typst/issues/3699

Edit: It may also be that the official CSL style hasn't been updated to reflect changes to the IEEE guidelines

JKRhb commented 6 months ago

While I was editing a CSL file, I had the impression that this might be caused by the fact that the author format uses the style defined in the bibliography element and not the one in the citation element.

So, if you have

  <bibliography et-al-min="4" et-al-use-first="1">
    ...
  </bibligraphy>

“et al.” is set for cited entries with more than three authors, but

  <citation et-al-min="4" et-al-use-first="1">
    ...
  </citation>

is ignored. Therefore, this could actually be a relatively simple fix.