# Ignoring name variable labels for sorting, subsequent author substitution

**URL:** <https://discourse.citationstyles.org/t/ignoring-name-variable-labels-for-sorting-subsequent-author-substitution/1158>\
**Category:** CSL Development\
**Created:** [March 12, 2013, 2:44pm UTC](https://discourse.citationstyles.org/t/ignoring-name-variable-labels-for-sorting-subsequent-author-substitution/1158 "2013-03-12T14:44:37Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rintze\_Zelle](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/rintze_zelle/32/175_2.png) [@Rintze\_Zelle](https://discourse.citationstyles.org/u/Rintze_Zelle)\
**Post date:** [March 12, 2013, 2:44pm UTC](https://discourse.citationstyles.org/t/ignoring-name-variable-labels-for-sorting-subsequent-author-substitution/1158/1 "2013-03-12T14:44:37Z")

</div>

Two related issues were raised on the Zotero forums:

> **[Sorting and editors](https://forums.zotero.org/discussion/25637/)**
>
> Is it possible to suppress the editors label? I've tried removing the label element from the name block, but that just reverts it to its default form.

1. Should name variable labels be ignored for sorting?

Previously, citeproc-js included the labels in the sort keys, which  
would give results like

Pollitt, C. and Bouckaert, G. (2004)  
Pollitt, C. and Bouckaert, G. (eds.) (1995)

when sorting on the author macro and ascending on date of issue. The  
consensus of the thread seems to be that it is preferable to ignore  
the labels instead for sorting, so we would get

Pollitt, C. and Bouckaert, G. (eds.) (1995)  
Pollitt, C. and Bouckaert, G. (2004)

1. Should name variable labels be ignored when applying subsequent  
author substitution?

Previously, citeproc-js would produce

Jones, Jim. 2011a. _A Title_. Location: Publisher.  
———. 2011b. _C Title_. Location: Publisher.  
Jones, Jim, ed. 2011c. _B Title_. Location: Publisher.

with subsequent-author-substitute active. The Zotero thread consensus  
seems to be that it would be preferable to get

Jones, Jim. 2011a. _A Title_. Location: Publisher.  
———. 2011b. _C Title_. Location: Publisher.  
———, ed. 2011c. _B Title_. Location: Publisher.—

Unless anybody objects within the next few days to either of these  
proposed changes I’ll modify the CSL specification accordingly.

Rintze

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [March 12, 2013, 3:28pm UTC](https://discourse.citationstyles.org/t/ignoring-name-variable-labels-for-sorting-subsequent-author-substitution/1158/2 "2013-03-12T15:28:23Z")

</div>



---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [March 12, 2013, 9:15pm UTC](https://discourse.citationstyles.org/t/ignoring-name-variable-labels-for-sorting-subsequent-author-substitution/1158/3 "2013-03-12T21:15:00Z")

</div>



---

<div class="post-metadata">

**Author:** ![Rintze\_Zelle](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/rintze_zelle/32/175_2.png) [@Rintze\_Zelle](https://discourse.citationstyles.org/u/Rintze_Zelle)\
**Post date:** [March 12, 2013, 9:23pm UTC](https://discourse.citationstyles.org/t/ignoring-name-variable-labels-for-sorting-subsequent-author-substitution/1158/4 "2013-03-12T21:23:35Z")

</div>

Some people use conditionals to sort items based on hard-coded cs:text  
strings, e.g. to separate journal articles from books in the  
bibliography.

Rintze

---

<div class="post-metadata">

**Author:** ![Sebastian\_Karcher](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/sebastian_karcher/32/176_2.png) [@Sebastian\_Karcher](https://discourse.citationstyles.org/u/Sebastian_Karcher)\
**Post date:** [March 12, 2013, 9:21pm UTC](https://discourse.citationstyles.org/t/ignoring-name-variable-labels-for-sorting-subsequent-author-substitution/1158/5 "2013-03-12T21:21:26Z")

</div>

> But mightn’t affixes and cs:text contain things meant to be  
> significant to the sort. I’m not sure.
> 
> For affixes I’d be inclined to say no, but as an example for non-variable  
> cs:text mattering, consider sort-keys constructed using text value… (as  
> e.g. for sorting by types).  
> I didn’t check if we have any on the repository, but see e.g.  
> [http://blogs.eui.eu/zotero/sort-a-bibliography-by-type.html](http://blogs.eui.eu/zotero/sort-a-bibliography-by-type.html) as well as  
> several forum threads.\> \>

---

<div class="post-metadata">

**Author:** ![Nick\_Bart](https://avatars.discourse-cdn.com/v4/letter/n/3bc359/32.png) [@Nick\_Bart](https://discourse.citationstyles.org/u/Nick_Bart)\
**Post date:** [March 14, 2013, 11:50am UTC](https://discourse.citationstyles.org/t/ignoring-name-variable-labels-for-sorting-subsequent-author-substitution/1158/6 "2013-03-14T11:50:45Z")

</div>

I might add that besides being consensus that it’s preferable—I’d  
certainly agree—, it’s also mandatory for some styles, e.g., for the  
Chicago Manual’s styles.

Besides, the sorting in the second example above is not quite right:  
According to CMoS 16e, it should be “listed alphabetically by title”  
(15.19):

Jones, Jim. 2011a. _A Title_. Location: Publisher.  
———, ed. 2011b. _B Title_. Location: Publisher.  
———. 2011c. _C Title_. Location: Publisher.

(“15.18 The 3-em dash with edited, translated, or compiled works. The  
3-em dash replaces the preceding name or names only, not an added ed.,  
trans., comp., or whatever. The chronological order is maintained,  
regardless of the added abbreviation.

15.19 Reference list entries with same author(s), same year. Two or  
more works by the same author in the same year must be differentiated  
by the addition of a, b, and so forth (regardless of whether they were  
authored, edited, compiled, or translated), and are listed  
alphabetically by title. Text citations consist of author and year  
plus letter.”)

Finally, “compiler” is missing in CSL. Since CMoS refers to this role  
throughout the manual, alongside editor and translator, it would  
probably be a good idea to include it future versions of CSL.

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [March 14, 2013, 1:00pm UTC](https://discourse.citationstyles.org/t/ignoring-name-variable-labels-for-sorting-subsequent-author-substitution/1158/7 "2013-03-14T13:00:54Z")

</div>

Going back to this:

…

> 1. Should name variable labels be ignored when applying subsequent  
> author substitution?
> 
> Previously, citeproc-js would produce
> 
> Jones, Jim. 2011a. _A Title_. Location: Publisher.  
> ———. 2011b. _C Title_. Location: Publisher.  
> Jones, Jim, ed. 2011c. _B Title_. Location: Publisher.
> 
> with subsequent-author-substitute active. The Zotero thread consensus  
> seems to be that it would be preferable to get
> 
> Jones, Jim. 2011a. _A Title_. Location: Publisher.  
> ———. 2011b. _C Title_. Location: Publisher.  
> ———, ed. 2011c. _B Title_. Location: Publisher.

Both to decide on the details, and also to ponder any particular  
specification language, I’d go back to first principles, and logic.

The subsequent-author-substitute feature refers to author groups,  
which are defined by names of the people in question; not their roles,  
or any other descriptors.

Bruce

---

<div class="post-metadata">

**Author:** ![andrea\_rossato2](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@andrea\_rossato2](https://discourse.citationstyles.org/u/andrea_rossato2)\
**Post date:** [March 23, 2013, 9:35am UTC](https://discourse.citationstyles.org/t/ignoring-name-variable-labels-for-sorting-subsequent-author-substitution/1158/8 "2013-03-23T09:35:32Z")

</div>

Sorry I’m coming late on this.

Rintze Zelle \<@Rintze\_Zelle\> writes:

> Two related issues were raised on the Zotero forums:
> 
> [Sorting and editors - Zotero Forums](http://forums.zotero.org/discussion/25637/)
> 
> 1. Should name variable labels be ignored for sorting?
> 
> Previously, citeproc-js included the labels in the sort keys, which  
> would give results like
> 
> Pollitt, C. and Bouckaert, G. (2004)  
> Pollitt, C. and Bouckaert, G. (eds.) (1995)
> 
> when sorting on the author macro and ascending on date of issue. The  
> consensus of the thread seems to be that it is preferable to ignore  
> the labels instead for sorting, so we would get
> 
> Pollitt, C. and Bouckaert, G. (eds.) (1995)  
> Pollitt, C. and Bouckaert, G. (2004)

This is perfectly achievable by just removing the label element from the  
sorting macro. I do not really understand why the processor should  
remove a label from a macro if this macro is used for sorting. There may  
be cases in which the label is required for sorting. That’s actually the  
reason for having a macro attribute for the key element – to consent  
the maximum flexibility when sorting references, is it not?

> 1. Should name variable labels be ignored when applying subsequent  
> author substitution?
> 
> Previously, citeproc-js would produce
> 
> Jones, Jim. 2011a. _A Title_. Location: Publisher.  
> ———. 2011b. _C Title_. Location: Publisher.  
> Jones, Jim, ed. 2011c. _B Title_. Location: Publisher.
> 
> with subsequent-author-substitute active. The Zotero thread consensus  
> seems to be that it would be preferable to get
> 
> Jones, Jim. 2011a. _A Title_. Location: Publisher.  
> ———. 2011b. _C Title_. Location: Publisher.  
> ———, ed. 2011c. _B Title_. Location: Publisher.

I tend to agree with the Zotero consensus and I’m actually changing the  
previous way citeproc-hs was dealing with the  
subsequent-author-substitute option.

Best,  
Andrea

---

<div class="post-metadata">

**Author:** ![Sebastian\_Karcher](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/sebastian_karcher/32/176_2.png) [@Sebastian\_Karcher](https://discourse.citationstyles.org/u/Sebastian_Karcher)\
**Post date:** [March 23, 2013, 3:52pm UTC](https://discourse.citationstyles.org/t/ignoring-name-variable-labels-for-sorting-subsequent-author-substitution/1158/9 "2013-03-23T15:52:21Z")

</div>

> This is perfectly achievable by just removing the label element from the  
> sorting macro. I do not really understand why the processor should  
> remove a label from a macro if this macro is used for sorting. There may  
> be cases in which the label is required for sorting. That’s actually the  
> reason for having a macro attribute for the key element – to consent  
> the maximum flexibility when sorting references, is it not?

the reason would be a) that it simplifies things and prevents us (which,  
let’s face it, means mainly Rintze and to some degree me)  
from having to adjust ~700 styles and b) that I’d argue that it’s the  
natural assumption made by people coding styles that aren’t testing this  
particular feature so it makes CSL more intuitive.  
And of course it would still be perfectly feasible to sort by author types  
in a sort macro if that’s indeed needed (and if we thing about localized  
styles, going by the labels seems a poor way of doing this - in English  
editors come before translators, in Finnish after them? That can’t be  
right).\> \> 2) Should name variable labels be ignored when applying subsequent
