punction-in-quote problem

I'm trying to address the points made at http://forums.zotero.org/discussion/28314/api-error-and-no-preview-for-styles-that-otherwise-work/#Item_2 and clean up the harvard-university-of-birmingham style sheet.

I'm having difficulty with the quotes. I need double quotes, with the punctuation within them. I've managed to define the double quotes in the locale, but punctuation-in-quote does not seem to be having any effect.

Here's what I have:
https://gist.github.com/tipichris/5227175

But the full stop following a book chapter title still appears outside the quotes. I've also tried moving the fullstop from a suffix to the title to a delimiter in the containing group, but with no effect.

Can anyone point me in the right direction here?
  • With that style, a chapter title comes out with the full stop inside the quotes here.
  • Any idea why my experience might be different? I'm testing in the Zotero test pane, Zotero 3.0.14, FF 19.0 on Linux.

    I did read through another thread here about inconsistent behaviour with punctuate-in-quote, but couldn't work out if any consensus on the cause was reached.
  • edited March 23, 2013
    I'm on FF17. Otherwise it's the same environment as yours (I'm using the Ubuntu distro). Sounds like maybe things will break when I upgrade. In a way it will be good if they do, since we'll have the cause.
  • I just upgraded Firefox, and the style is still putting the period inside the quote. Maybe someone else can make it fail?
  • I can replicate this - the problem seems to be that the quotes are set around a macro. If you change
    <else-if type="chapter" match="any">
    <group>
    <text macro="title" prefix=" " suffix="." quotes="true"/>
    to
    <else-if type="chapter" match="any">
    <group>
    <text variable="title" prefix=" " suffix="." quotes="true"/>

    (which shouldn't change anything else) this will work.

    That would still be a bug, though, but I suggest you just work around it now.

    Frank - are you sure you can't replicate this? I have the 1.0.67 version of the processor gadget running.
  • Great, thanks. That's sorted it.

    In the locale element, am I better of setting the xml:lang attribute to match the styles default (en-GB), to the more generic en, or leaving the attribute out altogether. All options work here, but is one more robust / portable or preferred?
  • edited March 23, 2013
    it doesn't matter - since you set en-GB for the style, specifying it again for the style options under cs:locale has no effect - positive or negative - so do whatever you think makes the code easier to read.
  • Ah. One other difference is that I was running MLZ, which has different toggles turned on in the processor. I'll take a look at that angle when I can get to it.
  • Well, this is odd. I ran the style of the gist above (which sets the suffix and quote attributes on a cs:text node with macro) in the test-bed, with all options turned off, just as it would run in Zotero. The punctuation still comes out inside the quotes, as per intended behavior.

    Puzzled as to why I can't make it fail.
  • Maybe there was something in the pattern of input data I used that affected the result. Can someone post an export of an item that failed locally?
  • edited March 23, 2013
    https://gist.github.com/adam3smith/5229528
    gives me
    Bergin, S. and Wraight, P. (1996) “Silver based wound dressings and topical agents for treating diabetic foot ulcers”. In Cochrane Database of Systematic Reviews [online]. John Wiley & Sons, Ltd. Available from: http://onlinelibrary.wiley.com/doi/10.1002/14651858.CD005082.pub2/abstract [Accessed 16 March 2013]

    (I don't feel like putting in the html tags - "In" is underlined, Cochrane... is bold).
  • Okay, that's done it. The bug is triggered by presence of a URL for some reason. I'll see if I can figure out what's going on with the processor.
  • The patch plugin now contains a processor update that should work with the original code.
Sign In or Register to comment.