Citation language sorting problem: solved!

I’ve been having a lot of difficulty with the various citation management software packages based on the CSL language, as none has a built-in style that aligns with how we’ve always formatted our citations, particularly the sort order.

From my understanding, what we want for citations by the same first author:
– single author pubs in chronological order (oldest first)
– multi-author pubs in chronological order (oldest first)

This morning I finally did the research to come up with a solution that appears to work!

This should sort all papers by their first author. Then within that, it sorts between single-author and multi-author papers. Within each of those categories it searches by year

Method 1: via a direct CSL code editor

In the macro section, add the following macro:

<macro name=”Author-count”>

<names variable=”author”>

<name form=”count” et-al-min=”3″ et-al-use-first=”2″/>



Then, in the <bibliography> section, specify your sort as:


<key macro=”author-short” names-min=”2″ names-use-first=”1″/>

<key macro=”Author-count”/>

<key macro=”year”/>


Method 2: via

1) add a new macro

– named author-count

– add an element for names

– add an element to names for variable ‘name’

– under “form” select “count”

– under “et-al-min” select “3”

– under “et-al-use-first” select “2”

2) under sort, first use a macro for “author-short”

– specify “names-min” as “2”

– specify “et-al-use-first as “1”

3) under sort, then add a macro for “author-count”

– leave all options blank (default)

4) under sort, add a 3rd macro for “year”

– leave all options blank (default)

Leave a comment