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!
  • I think you're right and that can't be done currently.
    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.
  • edited April 4, 2012
    Strange...

    But this seems to work if you add:
    <term name="page" form="short">
    <single>p.</single>
    <multiple>pp.</multiple>
    </term>

    in the &ltterms> section.


    EDIT: no, that's not working...
  • Thanks for the quick response. I haven't done a thorough search, but I can't think of a case where the journal would want page numbers elided in one case, and not in another...

    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 had an off-list discussion with Frank about this in July of 2011, and he was worried that normalizing the "page" locator range format was a bit dangerous. Maybe you can convince him otherwise, though :).
  • Would it be dangerous because people might put text or multiple numbers in the locator, as in "at 24–25, 27, and 29"? I could see how that might cause challenges...

    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?
  • edited April 4, 2012
    I've actually done an experiment with this, just beyond the edge of the CSL 1.0 schema. Try rendering the locator as number rather than text. That is, change this:<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.)
  • That works perfectly for my issue. With the simple change of text to number, the locator input "27–29" is correctly parsed as

    ", at pp. 27–9."

    Thanks so much for the quick fix, Frank!
  • That's great. Please post again if you run into cases where it doesn't work correctly.
  • edited April 10, 2012
    This is related to an issue I have had, where house style dictates the use of page ranges as follows: "pp. 345–67". The solution was to specify page-range-format="chicago" and render the locator as a number. This kept the plural "pp." and gave the page span as required.

    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".
Sign In or Register to comment.