When using citation style alphanumeric the Bibliography is ordered according to first appearance of the references in the text, i.e. in my case:
[Bv25a] …
[Saa03] …
[McK+20] …
This is not suitable for a document with many citations such as a book or thesis. A reader who has a printed out copy will not be able to find the citation unless the labels are ordered alphabetically.
However, I cannot find an option to change the order of the entries in the Bibliography. If I change the bibliography style to a style which is ordered alphabetically, the [AuthorYear] labels are not shown rendering the bibliography useless.
Am I missing some option or is this indeed an issue with the bibliography function?
From all the publications I have seen which use alphanumeric citation style, a bibliography with alphabetically ordered labels seems to be the norm.
This is a wild guess, but maybe the issue is, that alphanumeric is implemented analogous to the ieee style, which canonically has a bibliography with ordered labels, since the labels [1], [2] etc. are given according to first appearance in the text?
I don’t know if this is possible to use label/key names, as all styles just use either citation number or something else. Maybe it’s not implemented.
For alphabetical order, you need an appropriate style. Normally you would use official style that is provided/exists, and it will just work. If you don’t have one, then good luck finding which one you want. Maybe there is an easy search, but I don’t know any.
#set bibliography(style: "deutsche-sprache")
#let bib = ```yaml
Bv25a:
type: book
author: A
title: Book one
Saa03:
type: book
author: B
title: Book two
McK-20:
type: book
author: C
title: Book three
```.text
@Saa03
@Bv25a
@McK-20
#bibliography(bytes(bib))
I appreciate the answer.
I am using a biblatex bibliography file.
The text looks like this:
#set cite(style: "alphanumeric")
// ... main text
#bibliography("bib.bib")
without setting a style, i.e., using “ieee”.
This also seems to be the only default style which prints the label [AuthorYear] in the Bibliography.
I feel like the default bibliography which Typst has in mind for “alphanumeric” is not correct and not usual practice, as it should be sorted along [AuthorYear] labels rather than first occurance.
I think I will just change the citation style for this project that I am working on.
@pvp Hey, looks like you’re going down the same rabbit hole I got stuck in for a good while. Let me go ahead and summarize everything I’ve learned to save you some time.
For LaTeX and their alphanumeric style, be aware bibtex/biblatex, unless otherwise told, actually use their own custom engine (someone who knows more should correct me if I am wrong) to format citations. Meanwhile, Typst uses the standardized .csl file format (really XML) to format both citations and bibliography. Thus, for the alphanumeric style, the issue is that it’s associated CSL file doesn’t have settings for alphabetic sorting in the bibliography. See:
for that mess. in particular, you can use the .csl file at:
which has alphanumeric sorting for the bibliography. However, it, or maybe the Hayagriva engine Typst uses, has an issue where year disambiguation doesn’t work; that is, if you cite two papers by the same person in the same year, they will come out as the same citation, like two separate instances of [Doe99]. See
Yeah, I once faced the cryptic formatting engine and the horrors of making something yourself. I’m pretty sure you can use some CSL package to style things with a CSL style.