Trying to order duplicates in bibliography by their order of occurrence in text

eus
edited November 4, 2019
Hi everyone,

Zotero seems to sort double references (1988a, 1988b, 1988c) alphabetically by title.
I am trying to do it in a different way: by the order as cited in the text.

In the forum the most relevant hit related is this one:
https://forums.zotero.org/discussion/comment/185935/
It basically says: It is not possible.

But most numerical styles do exactly that kind of sorting, but for all references.

I understand that the way numerical styles do it ist the standard.
Every other way of sorting a bibliography is defined by adding sort key variables to the style like this:
<sort>
<key variable="title"/>
</sort>


So my questions are:
Is there a variable that accesses the actual number of the reference in the text?
Can it be used as a key variable to sort within a style?
If not: How could i process that variable within a style so that i could sort based on it?

Thanks!
  • <key variable="citation-number"/>
    kind of does that -- it's actually a bit more complicated but I think for your purposes it should work.

    (The link you point to asks not about sorting in a bibliography but about sorting in Zotero itself, which is a completely different question, and as I say there, doesn't really make sense conceptually)
  • eus
    edited November 5, 2019
    @adamsmith: key variable "citation-number" works perfectly for my purpose. Thanks for your quick reply.

    though the original problem could be marked 'solved' there is a bonus question: is there a comprehensive list auf sort key variables containing all keys beyond the field names?

  • You can sort by all variables in the CSL specifications http://docs.citationstyles.org/en/stable/specification.html#appendix-iv-variables and, in addition, create an infinite number of macros that can also be used for sorting (e.g. it's common to sort based on the author macro, instead of the variable, since the macro will substitute editors in the absence of authors, etc.).
Sign In or Register to comment.