typst / hayagriva

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

Narrative citation (`form: "prose"`) for `apa.csl` shows too many authors #149

Closed rikhuijzer closed 6 months ago

rikhuijzer commented 6 months ago

According to the Typst guide for LaTeX users, the Typst equivalent of \textcite is #cite(<key>, form: "prose"). I've been using that, but it looks like it isn't following the CSL file correctly for apa.csl. It shows 4 authors for me in the full text version while using APA 7, while the APA 7 CSL would abbreviate this to "Author et al.".

I've added a reproducible example below. This is as narrow as I could get now. It needs some more digging to find the root cause.

Reproducible Example

The file mwe.typ:

Lorem ipsum @alfa2000.

But also #cite(<alfa2000>, form: "prose").

#bibliography("mwe.bib", style: "apa")

with bibliography file mwe.bib:

@article{alfa2000,
    author = {Alfa, A and Bravo, B and Charlie, C and Delta, D},
    title = "Why Most Published Papers are Full of Text",
    year = 2000
}

will generate:

Lorem ipsum (Alfa et al., 2000).

But also Alfa, Bravo, Charlie, & Delta (2000).

Bibliography

Alfa, A., Bravo, B., Charlie, C., & Delta, D. (2000). Why Most Published Papers are Full of Text.

But this second sentence should have been:

But also Alfa et al. (2000).

LaTeX

I've loaded the latest official apa.csl file into LaTeX too. There the output is correct. With the same bib file, the text

lorem ipsum \textcite{alfa2000}.

correctly generates

lorem ipsum Alfa et al. (2000).

laurmaedje commented 6 months ago

Similar to https://github.com/typst/hayagriva/issues/141 (probably same cause).

The et-al handling had a regression in Typst 0.11 / Hayagriva 0.5.2.

rikhuijzer commented 6 months ago

Thanks @laurmaedje. I've tested by switching the order of the sentences around and, indeed, the second is wrong regardless of narrative or parenthesis citation. I'll close this issue