Why does incollection write the booktitle twice in the bibliography using the APA style?

I’ve tried several citation styles but this is the only one with the problem. This is the bib file:

@incollection{silva18,
  author={Silva, Fabio Laurindo and Pinho, Luiz Carlos and Wiedenbrug, Sofia},
  title     = {Chironomidae},
  booktitle = {Freshwater Invertebrates},
  editor    = {Neusa Hamada and James H. Thorp},
  pages     = {661--700},
  year      = {2018},
  publisher = {Academic Press},
}

And this is the minimal working example on typst:

cita @silva18. 

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

The output file produces double booktitle (Freshwater Invertebrates):

cita (Silva et al., 2018).
Bibliography
Silva, F. L., Pinho, L. C., & Wiedenbrug, S. (2018). Chironomidae. In N. Hamada & J. H. Thorp (Eds.), Freshwater Invertebrates: Freshwater Invertebrates (pp. 661–700). Academic Press.

Would you recomend to download another CSL file for APA style? maybe I can use APA6 instead of 7 or something like that to fix this problem

The simplest fix would be to change @incollection to @inbook.

Some context as to what’s happening here:
When using the @incollection type, Typst converts it to a hayagriva entry of type anthos with a parent of type anthology, but when using the @inbook type, Typst converts to it an entry of type chapter with a parent of type book (read more about hayagriva types here).

The APA CSL style defines that the title of a “book-like container” should be displayed as

{container-title}: {volume-title}

where Typst substitutes the corresponding values. The container-title variable is in both cases correctly set to the book or collection’s title. However, for the anthos-in-anthology case, the volume-title variable is also set to that value, while for the chapter-in-book case, it is left empty.

Now, I’m not well versed in the terminology of anthology, book, volume, and so on, so I can’t tell whether the conversions are working as intended or if there is something that can be improved.

1 Like

thank you! it works just fine.
Can I add Container Title and volume title through bibtex? This book from the example happens to have a title for the Volume as well. But is is not necessary.

You should ask this in GitHub - typst/hayagriva: Rusty bibliography management., since this is what Typst uses. For BibLaTeX that project uses GitHub - typst/citationberg: A library for parsing CSL styles..

Also, all up-to-date CSL styles can be found at GitHub - citation-style-language/styles: Official repository for Citation Style Language (CSL) citation styles..