How to sort bibliography by citation-label?

edited February 23, 2025
Hello,

I love using zotero, but formatting my bibliography is where I am stuck at right now. I am currently finalizing my thesis and need to have my references in a (stupid) format: First three letters of first authors last name + last two numbers of published year + [a,b,c...] for mutliple entries, in brackets. So far, it works by manually adding "citation-label: SCH21a" to the references "extra" section.

Now to my problem: I would like to sort my bibliography in word by these labels to no success. So if "Schuh 2021 -> [SCH21] and "Schmidt 22 -> [SCH22]" exist, the bibliography should show "[SCH21]" and then "[SCH22]", which does not work, instead it seems to sort by authors last name by default.

I tried making my own citation style, the bibliography section looks like this:

https://s3.amazonaws.com/zotero.org/images/forums/u6577051/6o6u7ga2ldk9mo16s2mz.png

Still doesn't work :( Does anyone know if what I want is possible? If yes, how?
  • Are there guidelines somewhere for the style you are trying to reproduce? It would be better to check for possible existing styles before creating your own from scratch - if none is a 100% match, perhaps one can be modified with minimal effort.
  • I checked quite extensively for that style but it does not seem to be common. The style I use now is based on the din-1505-2-alphanumeric style, but the bibliography sorting still doesn't work unfortunately, hence my question.
  • The question I'm asking is about an official description of the style you are looking for: the complete style, not the specific feature you are trying to implement. There are so many styles in existence, not all of them will be common and the feature you're looking for might be rare, but if the broader context is described it could enable useful hints. Customizing din-1505-2-alphanumeric is certainly a good strategy, but perhaps better choices are available.

    I don't know much about CSL myself, but based on your description I suppose you need to create some kind of variable that combines the first 3 letters of the author name and the last 2 digits of the year, and then refer to that new variable - which sounds possible to me. I guess the original style has no such variable before sorting, and computes the citation label only in the final stages of the formatting process (after sorting on author first and year second). Other forum participants in this forum will probably have more expertise in this area, sorry if I can't give you a direct answer.
  • The sorting by citation-label works. The DIN-1502 already does so correctly.
    However, potentially it doesn't do it correctly for manually defined ones or ones with a letter at the end.
  • @aborel: There is no further description available, I only have some rudimentary guidelines from my institute which leave a lot of room for interpretation:
    "The literature references consist of a name and year abbreviation: 3 letters (name abbreviation), 2 digits (year), and a, b, c, ... if multiple publications by the referenced person were made in the same year."

    @damnation: Thx for the info, since I need manually defined labels I seem to be out of luck...
  • I'm wondering, since both the author names and year are available anyway, can you not just sort by that instead of the citation-label? In the end the citation-label is based on that data anyway.
  • That does not work for authors which have the same first three letters in their last name, like in my example above.
  • Hi, I have the same problem. I've modified a style (https://www.zotero.org/styles/din-1505-2-alphanumeric) using the Visual CSL Editor (https://editor.citationstyles.org/visualEditor/).

    But it's still not working. Still it's sorting by Author Names an titles, if the name doubles, but not by citation-label. Seems like it's a Bug in Zotero and a very small niche case.

    I hope that someone has a solution, or maybe an idea where the bug comes from.
  • I'm a bit confused about the manually created label -- where is that stored/coming from? And does the DIN alphanumeric style work correctly for you?
  • edited February 24, 2025
    (The citation label is automatically created by citeproc, but if one is not happy with the formatting, one can override it via the citation-label variable in Zotero in extra and define it there)
  • edited February 25, 2025
    For me, it's also not working with the original DIN alphanumeric style.

    You can see it best in this screenshot:
    https://s3.amazonaws.com/zotero.org/images/forums/u14140562/z0037n5y9ptebrfpqf2p.png

    For reproducing purposes, this is my booklist (raw CSL JSON): https://pastebin.com/raw/Vy6V2mep
  • @adamsmith: I add the citation-label to the "extra" field in zotero.

    I also found an old thread in the forum, but the problem wasn't solved there either:
    https://forums.zotero.org/discussion/82288/sorting-issues-citation-label
  • I just gave this a test ride. It works, minus one of them marked in yellow:
    https://s3.amazonaws.com/zotero.org/images/forums/u452233/a6gzgs672bst5cm4qe2a.png
  • The DIN labels are also out of order in your image.
Sign In or Register to comment.