page-range-format attribute applied to locator?
I've created a new style according to the specifications for the journal Early Medieval Europe, but I'm having trouble with the page-range-format attribute applying to the locator. Is this supported?
Here's the link to my script: https://gist.github.com/2302143
The journal dictates that "Page numbers should be elided as far as possible, e.g. 190-3; 101-2 (but 14-16)," so I have set the page-range-format attribute to be "minimal" and that works fine for the page range. They also specify that both page ranges and reference locators should have p. or pp. labels, as in this example:
E. James, 'Beati Pacifici: Bishops and the Law in Sixth-Century Gaul', in J. Bossy (ed.), Disputes and Settlements: Law and the Human Relations in the West (Cambridge, 1983), pp. 25-46, at pp. 27-9.
My style can't get the locator label to be plural AND page range format to be minimal at the same time. If I input the page range 27–29 the label is correct but the page range isn't collapsed to minimal:
", at pp. 27–29."
If I manually change the page range to 27–9, the page range isn't recognized as valid and the label reverts to singular:
", at p. 27–9."
My suspicion is that the "page-range-format" attribute currently doesn't apply to the locator field. Is there any way this could be added? Or could anyone suggest a workaround other than manually editing them all in the final draft, as I'm currently doing?
Thanks!
Here's the link to my script: https://gist.github.com/2302143
The journal dictates that "Page numbers should be elided as far as possible, e.g. 190-3; 101-2 (but 14-16)," so I have set the page-range-format attribute to be "minimal" and that works fine for the page range. They also specify that both page ranges and reference locators should have p. or pp. labels, as in this example:
E. James, 'Beati Pacifici: Bishops and the Law in Sixth-Century Gaul', in J. Bossy (ed.), Disputes and Settlements: Law and the Human Relations in the West (Cambridge, 1983), pp. 25-46, at pp. 27-9.
My style can't get the locator label to be plural AND page range format to be minimal at the same time. If I input the page range 27–29 the label is correct but the page range isn't collapsed to minimal:
", at pp. 27–29."
If I manually change the page range to 27–9, the page range isn't recognized as valid and the label reverts to singular:
", at p. 27–9."
My suspicion is that the "page-range-format" attribute currently doesn't apply to the locator field. Is there any way this could be added? Or could anyone suggest a workaround other than manually editing them all in the final draft, as I'm currently doing?
Thanks!
I agree it should be doable somehow, but I wonder what the best way would be:
It would be easy to automatically apply the page-range-format to locators in all cases. That certainly seems to be the standard - Chicago Manual does that, too, for example.
That would just require a small change in the processor and could likely happen within one of the next Zotero versions.
The question is whether there are exceptions and/or undesirable side-effects from this. If we need a separate option that's more complicated.
But this seems to work if you add:
<term name="page" form="short">
<single>p.</single>
<multiple>pp.</multiple>
</term>
in the <terms> section.
EDIT: no, that's not working...
If this could be added to a future release of the processor, that'd be great.
I also would be happy to add this style to the repository, if others would be willing to test it.
Thanks again.
I wouldn't mind having to make the page ranges minimal manually really, if doing so didn't also break the plural label formatting. Maybe the way that is determined could be tweaked?
<text variable="locator"/>
To this:
<number variable="locator"/>
... and see if that helps. This isn't valid CSL, but I'd be interested to know how well it works out for people.
I think the field has to be pretty purely numeric for it to work. A comma or an ampersand will be forgiven, and the range truncation will work on all numeric elements with correct pluralization. Other characters will break the parse, though, and in that case you'll just get the string as written, with pluralization set to singular. (Strings that don't parse will have is-numeric set to false, so I suppose some accommodation could be made in the style code to cover even these.)
", at pp. 27–9."
Thanks so much for the quick fix, Frank!
Edit: But this only works if the locator string is entered "345-367". Otherwise, for example if the locator string is entered as "345-67", the locator is not recognised as plural, and the output is "p. 345-67".