# "label" problem

**URL:** <https://discourse.citationstyles.org/t/label-problem/427>\
**Category:** CSL Development\
**Created:** [February 14, 2008, 1:05pm UTC](https://discourse.citationstyles.org/t/label-problem/427 "2008-02-14T13:05:14Z")\
**Posts on this page:** 20\
**Page:** 1

<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:** [February 14, 2008, 1:05pm UTC](https://discourse.citationstyles.org/t/label-problem/427/1 "2008-02-14T13:05:14Z")

</div>

As I’m working on a style for Helga, I’m realizing that this is a hack:

```
    <group suffix=".">
      <text macro="publisher" prefix=" "/>
      <group prefix=", ">
	<text variable="page" prefix="p. "/>
      </group>
    </group>

```

I suggest that we modify this …

## The label element is used to print text terms that depend on document

content

## for pluralization. For labeling pages, this is preferable, as pages

may be

## either singular or plural (p. or pp.)

div {  
label =  
element cs:label {  
label-primitives,  
attribute variable { “page” | “locator” }  
}  
label-primitives =  
formatting,  
include-period?,  
attribute form { cs-term-forms }  
}

… to add an attribute:

## on by default, but if set to false, always uses singular label

attribute pluralize { xsd:boolean }?

Bruce

---

<div class="post-metadata">

**Author:** ![Dan\_Stillman](https://avatars.discourse-cdn.com/v4/letter/d/ecb155/32.png) [@Dan\_Stillman](https://discourse.citationstyles.org/u/Dan_Stillman)\
**Post date:** [February 14, 2008, 9:05pm UTC](https://discourse.citationstyles.org/t/label-problem/427/2 "2008-02-14T21:05:20Z")

</div>

For what it’s worth, pluralization technically isn’t as simple as a  
boolean. See  
[http://developer.mozilla.org/en/docs/Localization\_and\_Plurals](http://developer.mozilla.org/en/docs/Localization_and_Plurals) for the  
fun details. Of course, we don’t actually handle these correctly in  
Zotero at the moment either…

---

<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:** [February 14, 2008, 9:12pm UTC](https://discourse.citationstyles.org/t/label-problem/427/3 "2008-02-14T21:12:23Z")

</div>

Dan Stillman wrote:

> > … to add an attribute:
> > 
> > ## on by default, but if set to false, always uses singular label
> > 
> > attribute pluralize { xsd:boolean }?
> 
> For what it’s worth, pluralization technically isn’t as simple as a  
> boolean. See  
> [http://developer.mozilla.org/en/docs/Localization\_and\_Plurals](http://developer.mozilla.org/en/docs/Localization_and_Plurals) for the  
> fun details. Of course, we don’t actually handle these correctly in  
> Zotero at the moment either…

So what do you suggest?

ATM, we have a somewhat ugly situation where we have a variety of  
language-specific styles. This is why Helga was complaining about the  
“p.” in her output. So all those Harvard styles (and APA?) are  
English-specific. If I support her new Harvard variant without some way  
to turn off pluralization, I think I need to use the same hack, which  
means that styles is specific German.

Bruce

---

<div class="post-metadata">

**Author:** ![Dan\_Stillman](https://avatars.discourse-cdn.com/v4/letter/d/ecb155/32.png) [@Dan\_Stillman](https://discourse.citationstyles.org/u/Dan_Stillman)\
**Post date:** [February 14, 2008, 10:17pm UTC](https://discourse.citationstyles.org/t/label-problem/427/4 "2008-02-14T22:17:29Z")

</div>

> Dan Stillman wrote:
> 
> > > … to add an attribute:
> > > 
> > > ## on by default, but if set to false, always uses singular label
> > > 
> > > attribute pluralize { xsd:boolean }?
> > 
> > For what it’s worth, pluralization technically isn’t as simple as a  
> > boolean. See  
> > [http://developer.mozilla.org/en/docs/Localization\_and\_Plurals](http://developer.mozilla.org/en/docs/Localization_and_Plurals) for the  
> > fun details. Of course, we don’t actually handle these correctly in  
> > Zotero at the moment either…
> 
> So what do you suggest?

I don’t actually have a suggestion at the moment (which is why it isn’t  
implemented in Zotero)–just throwing it out there in case somebody  
wants to address it.

> ATM, we have a somewhat ugly situation where we have a variety of  
> language-specific styles. This is why Helga was complaining about the  
> “p.” in her output. So all those Harvard styles (and APA?) are  
> English-specific. If I support her new Harvard variant without some way  
> to turn off pluralization, I think I need to use the same hack, which  
> means that styles is specific German.

Well, you don’t really need to use the hack. Just base her style on one  
of the other Harvard styles. Harvard 1 is the only one with a hard-coded  
value (or that had a hard-coded value before Julian changed it). All the  
other Harvard styles, and all the Harvard styles on the first page of  
Google hits, use “pp.” for multiple pages. Julian’s change actually  
makes Harvard 1 non-compliant with the Anglia guidelines on which it’s  
based–so maybe that one should just remain hard-coded.

If there are other examples where we could avoid having multiple  
variants, a “pluralize” attribute may be fine, but Anglia’s “p.”  
requirement seems pretty language-specific as-is.

---

<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:** [February 15, 2008, 3:08am UTC](https://discourse.citationstyles.org/t/label-problem/427/5 "2008-02-15T03:08:34Z")

</div>

Dan Stillman wrote:

> Well, you don’t really need to use the hack. Just base her style on one  
> of the other Harvard styles. Harvard 1 is the only one with a hard-coded  
> value (or that had a hard-coded value before Julian changed it). All the  
> other Harvard styles, and all the Harvard styles on the first page of  
> Google hits, use “pp.” for multiple pages. Julian’s change actually  
> makes Harvard 1 non-compliant with the Anglia guidelines on which it’s  
> based–so maybe that one should just remain hard-coded.
> 
> If there are other examples where we could avoid having multiple  
> variants, a “pluralize” attribute may be fine, but Anglia’s “p.”  
> requirement seems pretty language-specific as-is.

The version she cites also uses the single “S.” label for both singular  
and plural. That’s why I raised this issue. Does this seem like a  
sensible solution then?

Bruce

---

<div class="post-metadata">

**Author:** ![Dan\_Stillman](https://avatars.discourse-cdn.com/v4/letter/d/ecb155/32.png) [@Dan\_Stillman](https://discourse.citationstyles.org/u/Dan_Stillman)\
**Post date:** [February 15, 2008, 3:44am UTC](https://discourse.citationstyles.org/t/label-problem/427/6 "2008-02-15T03:44:15Z")

</div>

Perhaps it’s wrong, but the German locale currently has “S.” (the period  
is a mistake) for both singular and plural.

---

<div class="post-metadata">

**Author:** ![Julian\_Onions](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@Julian\_Onions](https://discourse.citationstyles.org/u/Julian_Onions)\
**Post date:** [February 15, 2008, 7:46am UTC](https://discourse.citationstyles.org/t/label-problem/427/7 "2008-02-15T07:46:05Z")

</div>

I was wondering in the case of the p. versus pp. if a simple solution would  
be to override the within the CSL definition. This does make it  
language dependant though, although it would fall back to something more  
sensible.

Julian.

---

<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:** [February 15, 2008, 1:31pm UTC](https://discourse.citationstyles.org/t/label-problem/427/8 "2008-02-15T13:31:29Z")

</div>

Julian Onions wrote:

> I was wondering in the case of the p. versus pp. if a simple solution  
> would be to override the within the CSL definition. This does  
> make it language dependant though

Exactly. I thought of that at first, too, but I don’t think that’s a  
good solution for that very reason.

I’m suggesting simply:

I didn’t have time to read through the link that Dan sent, but is there  
any reason this is a bad idea? I know it’s simple to implement in code,  
and it’s certainly straightforward at the markup level.

Of course, per Simon’s latest request, I support it could also be an  
option (?).

Bruce

---

<div class="post-metadata">

**Author:** ![Julian\_Onions](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@Julian\_Onions](https://discourse.citationstyles.org/u/Julian_Onions)\
**Post date:** [February 15, 2008, 1:45pm UTC](https://discourse.citationstyles.org/t/label-problem/427/9 "2008-02-15T13:45:14Z")

</div>

> Julian Onions wrote:
> 
> > I was wondering in the case of the p. versus pp. if a simple solution  
> > would be to override the within the CSL definition. This does  
> > make it language dependant though
> 
> Exactly. I thought of that at first, too, but I don’t think that’s a  
> good solution for that very reason.
> 
> I’m suggesting simply:
> 
> I didn’t have time to read through the link that Dan sent, but is there  
> any reason this is a bad idea? I know it’s simple to implement in code,  
> and it’s certainly straightforward at the markup level.
> 
> Of course, per Simon’s latest request, I support it could also be an  
> option (?).
> 
> I asked for this a while ago in the context of names, as I had to hard  
> wire (or ignore) certain markup.

Please could we have the modifier plural=true/false on the label. A number

> of journals have the designator “ed.” regardless of the number of editors. I  
> think I’ve seen one the other way with “eds.” given for even one editor.  
> Similar “tran.” even for multiple translators.

It would actually be a tri-state, with plural=true forcing a pluralisation,  
plural=false forcing singular, and the default to be dependant on the  
existing rules.

It might be better to be more explicit though with something like  
force=plural force=singular force=context  
except something better than “force” for the name.

Julian.

---

<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:** [February 15, 2008, 3:30pm UTC](https://discourse.citationstyles.org/t/label-problem/427/10 "2008-02-15T15:30:52Z")

</div>

> I asked for this a while ago in the context of names, as I had to hard wire  
> (or ignore) certain markup.
> 
> > Please could we have the modifier plural=true/false on the label. A number  
> > of journals have the designator “ed.” regardless of the number of editors. I  
> > think I’ve seen one the other way with “eds.” given for even one editor.  
> > Similar “tran.” even for multiple translators.

Oops 🙂

> It would actually be a tri-state, with plural=true forcing a pluralisation,  
> plural=false forcing singular, and the default to be dependant on the  
> existing rules.
> 
> It might be better to be more explicit though with something like  
> force=plural force=singular force=context  
> except something better than “force” for the name.

What would “context” mean? How does context impact this question?

Bruce

---

<div class="post-metadata">

**Author:** ![Julian\_Onions](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@Julian\_Onions](https://discourse.citationstyles.org/u/Julian_Onions)\
**Post date:** [February 15, 2008, 3:35pm UTC](https://discourse.citationstyles.org/t/label-problem/427/11 "2008-02-15T15:35:50Z")

</div>

> > It would actually be a tri-state, with plural=true forcing a  
> > pluralisation,  
> > plural=false forcing singular, and the default to be dependant on the  
> > existing rules.
> > 
> > It might be better to be more explicit though with something like  
> > force=plural force=singular force=context  
> > except something better than “force” for the name.
> 
> What would “context” mean? How does context impact this question?

Its probably a bad name, but it would mean the current behaviour. I.e., it  
would be either singular or plural based on the context of the label - so  
plural for a page range and singular for a single page, plural for multiple  
authors etc.  
(I like having labels that are explicit in general.)

Julian.

---

<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:** [February 15, 2008, 3:39pm UTC](https://discourse.citationstyles.org/t/label-problem/427/12 "2008-02-15T15:39:29Z")

</div>

OIC, so in other words, some styles always want “pp” some always want  
"p" and some do the sane thing!

Right?

OK, unless I hear any objections, I’ll come up with something either  
later this evening, or tomorrow. Simon, is that OK with you?

In the meantime, if anybody has any better suggestions for attribute  
and value names, feel free to post them.

Bruce

---

<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:** [February 16, 2008, 9:51pm UTC](https://discourse.citationstyles.org/t/label-problem/427/13 "2008-02-16T21:51:04Z")

</div>

OK, how’s this?

```
 attribute pluralize {

   ## pluralize regardless of whether there is one or more items
   "always"
   >
     ## never pluralize regardless of whether there is a list of items
     "never"
   >
     ## default; pluralize depending on context
     "contextual"
 }?

```

Bruce

---

<div class="post-metadata">

**Author:** ![Elena\_Razlogova](https://avatars.discourse-cdn.com/v4/letter/e/c89c15/32.png) [@Elena\_Razlogova](https://discourse.citationstyles.org/u/Elena_Razlogova)\
**Post date:** [February 17, 2008, 1:23pm UTC](https://discourse.citationstyles.org/t/label-problem/427/14 "2008-02-17T13:23:57Z")

</div>

This sounds great. Elena

---

<div class="post-metadata">

**Author:** ![Simon\_Kornblith](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Simon\_Kornblith](https://discourse.citationstyles.org/u/Simon_Kornblith)\
**Post date:** [February 17, 2008, 11:08pm UTC](https://discourse.citationstyles.org/t/label-problem/427/15 "2008-02-17T23:08:46Z")

</div>

Sorry for coming in late to this discussion (I didn’t realize Mail  
wasn’t checking my folders for whatever reason). Do you think this is  
better than calling the attribute “plural” and having  
"true"/“false”/“contextual” options (for consistency with the plural  
attribute on )?

Simon

---

<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:** [February 17, 2008, 11:21pm UTC](https://discourse.citationstyles.org/t/label-problem/427/16 "2008-02-17T23:21:21Z")

</div>

Simon Kornblith wrote:\> On Feb 16, 2008, at 1:51 PM, Bruce D’Arcus wrote:

> > OK, how’s this?
> > 
> > ```
> > attribute pluralize {
> > 
> > ## pluralize regardless of whether there is one or more items
> > "always"
> > >
> > ## never pluralize regardless of whether there is a list of  
> > 
> > ```
> > 
> > items  
> > “never”  
> > \>  
> > ## default; pluralize depending on context  
> > “contextual”  
> > }?
> 
> Sorry for coming in late to this discussion (I didn’t realize Mail  
> wasn’t checking my folders for whatever reason). Do you think this is  
> better than calling the attribute “plural” and having  
> “true”/“false”/“contextual” options (for consistency with the plural  
> attribute on )?

I forgot about that. But, it’s not documented, so what does it mean?

```
       attribute plural { xsd:boolean }?)

```

Bruce

---

<div class="post-metadata">

**Author:** ![Simon\_Kornblith](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Simon\_Kornblith](https://discourse.citationstyles.org/u/Simon_Kornblith)\
**Post date:** [February 18, 2008, 6:33am UTC](https://discourse.citationstyles.org/t/label-problem/427/17 "2008-02-18T06:33:15Z")

</div>

It pluralizes a term. For example:

prints “pages,” rather than “page.”

Simon

---

<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:** [February 18, 2008, 3:32pm UTC](https://discourse.citationstyles.org/t/label-problem/427/18 "2008-02-18T15:32:41Z")

</div>

Simon Kornblith wrote:

> > Simon Kornblith wrote:
> > 
> > > > OK, how’s this?
> > > > 
> > > > attribute pluralize {
> > > > 
> > > > ```
> > > > ## pluralize regardless of whether there is one or more items
> > > > "always"
> > > > >
> > > > ## never pluralize regardless of whether there is a list of
> > > > 
> > > > ```
> > > > 
> > > > items  
> > > > “never”  
> > > > \>  
> > > > ## default; pluralize depending on context  
> > > > “contextual”  
> > > > }?  
> > > > Sorry for coming in late to this discussion (I didn’t realize Mail  
> > > > wasn’t checking my folders for whatever reason). Do you think this is  
> > > > better than calling the attribute “plural” and having  
> > > > “true”/“false”/“contextual” options (for consistency with the plural  
> > > > attribute on )?  
> > > > I forgot about that. But, it’s not documented, so what does it mean?
> > 
> > ```
> > attribute plural { xsd:boolean }?)
> > 
> > ```
> 
> It pluralizes a term. For example:
> 
> prints “pages,” rather than “page.”

So then is consistent with the expectations on label, except that label  
has a default behavior of contextual pluralization?

With that understanding in mind, I’ve made the following change:

```
 ##

```

---

<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:** [February 18, 2008, 5:58pm UTC](https://discourse.citationstyles.org/t/label-problem/427/19 "2008-02-18T17:58:12Z")

</div>

BTW, any chance someone can add support for the label/@plural attribute  
to Zotero soon, so that we can fix the few existing styles that need  
this now? I added this to help out a frustrated German user if you’ll  
remember, and it seems like a trivial (one-line?) fix.

Bruce

---

<div class="post-metadata">

**Author:** ![Richard\_Karnesky](https://avatars.discourse-cdn.com/v4/letter/r/ba8739/32.png) [@Richard\_Karnesky](https://discourse.citationstyles.org/u/Richard_Karnesky)\
**Post date:** [October 16, 2008, 4:25pm UTC](https://discourse.citationstyles.org/t/label-problem/427/20 "2008-10-16T16:25:35Z")

</div>

I do not know how much the xbiblio tracker is followed by others &  
this issue was first discussed on this list in February, but people  
seem to have gone away with different expectations.

[http://tinyurl.com/csl-plural](http://tinyurl.com/csl-plural)  
which leads to:  
[https://sourceforge.net/tracker/index.php?func=detail&aid=2172202&group\_id=117435&atid=678021](https://sourceforge.net/tracker/index.php?func=detail&aid=2172202&group_id=117435&atid=678021)

–Rick

[Next page](https://discourse.citationstyles.org/t/label-problem/427.md?page=2)
