Suppressing period in citations with other punctuation

I noticed today the suppression of periods in citations where titles already end in punctuation is not working in some cases. For both APA 6th edition and Chicago (author-date, note, and full-note), a period is added after other punctuation already present in the title (.?!) in at least the following situations:
1. Conference Paper - ? at end of proceedings title
2. Book Section - ? at end of book title if no pages, volume, or edition (the things that appear in parentheses in APA style) are entered
3. Conference Paper - ? at end of article title if no proceedings title is entered
4. Journal Article - ? at end of article title if no journal title is entered

Obviously, 4 is unlikely to ever come up in correctly entered data, but 1-3 are all reasonable. It seems like the error is occurring when punctuation ends a title in a citation that could potentially be followed by some other content (pages, volumes, editions, a container title, etc.), but isn't.

I'm not sure when this bug appeared; as far as I can recall they were rendering correctly in the past, but given the rarity of such citations, may not have noticed or checked.

Has there been a recent update to the CSL processor that may have changed this behavior, or is this more likely an issue with the styles?
  • That'd seem like a processor bug to me. Especially since Chicago and APA are quite different.
    It could be related to the fact that, at least in Chicago, we do use comma after question marks in citations, so maybe whatever Frank did to accommodate that was overly permissive:
    To recap the Chicago rules:
    A period will never follow a question mark or exclamation mark:
    http://www.chicagomanualofstyle.org/16/ch06/ch06_sec118.html

    Where warranted by citation structure, a comma does follow question marks or exclamation marks.
    http://www.chicagomanualofstyle.org/16/ch06/ch06_sec119.html

    (you should never have a period ending a title in your data except when it's an abbreviation and in those cases two periods may be warranted).
  • Yeah, the inclusion of a period in the list of punctuation was just to be clear about all of the conditions under which the bug occurs.
  • edited November 9, 2014
    It could be related to the fact that, at least in Chicago, we do use comma after question marks in citations, so maybe whatever Frank did to accommodate that was overly permissive
    No, the parameters are correct. It's just a bug.

    It's an issue with styling attributes. In the CSL Editor, if you remove the italics, the punctuation will merge. If quotes="true" is added, they will also merge. With italics alone (or small-caps, or boldface), the punctuation does not migrate across the boundary, and the merge fails.

    If a period is allowed to migrate across the boundary, it fixes the merge, but it involves compromises. Please take a look at this test. The style there sets names without initials in boldface, followed by a period to delimit the list of names. If periods are allowed to migrate, the period will fall within the scope of the boldface.

    If this is acceptable, I can make a release of it.
  • In general, I think I would expect the period to take on the formatting of the word it appends, and the difference between a normal, boldface, and italic period is typically quite minor. So, that compromise seems better than erroneously adding a period.
  • edited November 9, 2014
    We may be able to do better, and cover the example linked above, by reading ahead for merge partners.

    More news within the day (UTC+9:00), I hope. Please bear in mind that duplicate punctuation control, punctuation merger, and quote swapping are unavoidably more complicated to handle than it may seem from the finished citations.
  • Certainly understand the complicated nature. Appreciate your investigation.
  • To be honest, I'm not quite sure what our current rules are on applying text attributes to affixes/delimiters?
    Do we cover that in the specs? Have we previously agreed on this?

    As for citation styles--punctuation determined by the style should generally not the the text formatting of the preceding text (though I agree with Brandon that it's rarely noticeable). I haven't thought through entirely what this means for the question above, though.
  • Under the spec, affixes are not supposed to take on the formatting of the element to which they attach (or its children).

    http://citationstyles.org/downloads/specification.html#affixes
  • great. And where needed, you can format affixes by enclosing the cs:text element in a group. I now recall that we discussed this and it's a good solution. So the closer the processor can follow that, the better.
  • Okay, it looks like we have code that covers all of these cases correctly. I need to do some cleanup to the formatting, but it will be out tomorrow.
  • Actually, it's ready. You can try out the revised processor in Zotero for Firefox with the patch plugin. The plugin can and should be disabled or removed at the next Zotero release.
  • I just noticed that the patch plugin doesn't work with the Capitalize Subtitles Gadget--subtitles remain in lowercase when the patch is enabled.

    Also, is there a way to tell which version of citeproc.js Zotero is using so that I can tell when this patch has been incorporated natively?
  • Citeproc updates are listed in the changelog:
    https://www.zotero.org/support/4.0_changelog
    Note sure why there wasn't an update with the current version, I believe time was running a bit short and the updated had to come out for Firefox 34 compatibility.

    The Capitalize Subtitles Gadget is, I thought, the same as the patch plugin with some bonus features - if you just have that enabled, doesn't that also fix the punctuation issue for you?
  • Ah, I see. I hadn't looked into how the Capitalize Gadget actually worked. Thanks for pointing it out. It looks like Frank hasn't had a chance to update the Capitalize Gadget for the newer version of the processor.
  • I could be wrong about this; that's just how I understood Frank.
  • I'll update the gadget tomorrow (I'll be away from home today).
Sign In or Register to comment.