When using the alphanumeric
citation style, I’ve encountered an issue with how bibliography labels are generated when there are multiple entries by the same author(s) in the same year.
Typst disambiguates the citations in the text by adding letters (e.g., a
, b
), as expected, but it doesn’t seem to apply the same disambiguation to the labels within the bibliography itself. Both entries end up with the same label (e.g., [ASS96]
).
Here’s a minimal example:
#set cite(style: "alphanumeric")
@Abelson1 @Abelson2
#bibliography(
bytes("
@book{Abelson1,
title = {Structure and Interpretation of Computer Programs},
author = {Harold Abelson and Gerald Jay Sussman and Julie Sussman},
year = {1996}
}
@book{Abelson2,
title = {Computers},
author = {Harold Abelson and Gerald Jay Sussman and Julie Sussman},
year = {1996}
}
"),
)
This produces the following output:
The text citation shows [ASS96a, ASS96b]
, as expected. However, in the Bibliography section, both entries are labelled [ASS96]
and the year within the entry details gets the letter, like 1996a
, but the main bracketed label remains ambiguous.
For comparison, here is how biblatex
(with style=alphabetic
) handles the same situation in LaTeX:
\begin{filecontents}{refs.bib}
@book{Abelson1,
title = {Structure and Interpretation of Computer Programs},
author = {Harold Abelson and Gerald Jay Sussman and Julie Sussman},
year = {1996}
}
@book{Abelson2,
title = {Computers},
author = {Harold Abelson and Gerald Jay Sussman and Julie Sussman},
year = {1996}
}
\end{filecontents}
\documentclass{article}
\usepackage[
style=alphabetic,
sorting=none,
]{biblatex}
\addbibresource{refs.bib}
\begin{document}
~\cite{Abelson1, Abelson2}
\printbibliography
\end{document}
This LaTeX code produces the following output:
Here, the bibliography labels themselves are disambiguated as [ASS96a]
and [ASS96b]
.
Is there a way in Typst, to make the bibliography labels include the disambiguation letters to match the text citations and the behavior shown in the LaTeX example?
Any help or pointers on how to achieve this would be greatly appreciated!
Thanks!