Modify sort order of same first author, same year citations in text and in bibliography

edited 7 days ago
I'm working with same first author, multi-author references and trying to modify a citation style according to the following author guidelines:

For in-text citations:
"If multiple papers occur with the same first author and year, these are ordered by when they are first cited in the text (receiving an a, b, c, etc. after the year both in the text and in the reference list)."

For the bibliography:
"Papers with three or more authors are in chronological order regardless of second author name (so that people can easily find the ‘et al.’ papers). If multiple papers occur with the same authorship and year, these are ordered by when they are first cited in the text (receiving an a, b, c, etc. after the year both here and in the text – below)."

The references I'm working with are multi-author papers (similar author sets, but different orders and different total numbers of authors) from 2016 and 2017, all with the same first author. In the bibliography, I want the 2016 paper to appear first, and then the 2017 papers to appear a, b, c in the order in which they are first cited in the text. The author guidelines don't have instructions exactly specific to this case, but I've been in touch with the journal editors and this is how they would interpret their guidelines and apply them to these references.

Weiser, E.L., R.B. Lanctot, S.C. Brown, J.A. Alves, P.F. Battley, … B.K. Sandercock. 2016. Effects of geolocators on hatching success, return rates, breeding movements, and change in body mass in 16 species of Arctic-breeding shorebirds. Movement Ecology 4: 12.

Weiser, E.L., S.C. Brown, R.B. Lanctot, H.R. Gates, K.F. Abraham, … B.K. Sandercock. 2017a. Effects of environmental conditions on reproductive effort and nest success of Arctic-breeding shorebirds. Ibis 160: 608–623.

Weiser, E.L., R.B. Lanctot, S.C. Brown, H.R. Gates, R.L. Bentzen, … B.K. Sandercock. 2017b. Environmental and ecological conditions at Arctic breeding sites have limited effects on true survival rates of adult shorebirds. Auk 135: 29–43.

Weiser, E.L., S.C. Brown, R.B. Lanctot, H.R. Gates, K.F. Abraham, … B.K. Sandercock. 2017c. Life-history tradeoffs revealed by seasonal declines in reproductive traits of Arctic-breeding shorebirds. Journal of Avian Biology 49: jav-01531.

With my current .csl, my in-text citations are:

Here is the first Weiser et al article (Weiser et al. 2017c)
Here is another (Weiser et al. 2017a)
And another. (Weiser et al. 2017b)

I want them to appear as:

Here is the first Weiser et al article (Weiser et al. 2017a)
Here is another (Weiser et al. 2017b)
And another. (Weiser et al. 2017c)

For a new instance of a grouped citation (i.e. none of the citations have appeared previously), I get (Weiser et al. 2016, 2017b, c, a) - I'm not sure how the citation sort code is sorting in this particular case.

I want them to appear as:

(Weiser et al. 2016, 2017a, b, c)

My csl code is:
<citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" cite-group-delimiter=", " collapse="year-suffix"><sort>
<key macro="issued"/>
<key macro="author" names-min="3" names-use-first="1"/>
</sort>

<bibliography et-al-min="20" et-al-use-first="5" et-al-use-last="true" delimiter-precedes-et-al="never" entry-spacing="1" line-spacing="1" hanging-indent="false">
<sort>
<key macro="author" names-min="3" names-use-first="1"/>
<key macro="issued" sort="ascending"/>
<key macro="title"/>
</sort>

Is it possible to achieve what I'm after? So for same year, same first author, multi-author citations I want the in-text order of appearance to override anything else for sort order. And for a first instance of a grouped citation, I want them to sort a, b, c irregardless of anything else.

Thanks for any help!
  • This is a bit tricky, but the two things to look at would be to add a sort key for citation-number (which will sort by order of appearance in the text) for the bibliography) and to take advantage of the names-mn attribute in sort to only sort by the first-author name & disregard the rest.
    <key macro="author" names-min="1" names-use-first="1"/>
    So I think you'll want something like
    <sort>
    <key macro="author" names-min="1" names-use-first="1"/>
    <key macro="issued-year"/
    <key variable="citation-number"/>
    </sort>

    For both bibliography and citation.
    (where "issued-year" may have a different name: it should be the macro rendering just the citation year). I think that should work, but haven't tested.

    For sharing short bits of code here, wrap them in <code> </code> html tags. For longer bits, post to hastebin.com, click on the page with the + sign and provide the URL here.
  • Your suggestion worked exactly as I wanted, thank you Adam!
Sign In or Register to comment.