"label" problem

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

For what it’s worth, pluralization technically isn’t as simple as a
boolean. See
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…

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 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

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 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.

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

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

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.

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

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.

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 :slight_smile:

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

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.

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

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

This sounds great. Elena

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

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

It pluralizes a term. For example:

prints “pages,” rather than “page.”

Simon

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:

 ##

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

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
which leads to:
https://sourceforge.net/tracker/index.php?func=detail&aid=2172202&group_id=117435&atid=678021

–Rick