Extra Space after Opening Bracket or Parenthesis in SBL Style

Greetings, all.

I'm using the most current version of the SBL style (5/3/14) in the most current version of Zotero (4.0.22) in Word 2007 and Word 2013 (on two different Windows 7 machines). Yesterday, I noticed that the style is now adding a space after an opening parenthesis or opening square bracket when that character is added in a citation's prefix field. In SBL style, citations are often enclosed in parentheses or square brackets when they are included in content footnotes.

So, for instance, if I want to get the output:
(Roberts, Donaldson, and Coxe, Ante-Nicene Fathers, 2:427)
or:
[Roberts, Donaldson, and Coxe, Ante-Nicene Fathers, 2:427]
I would typically add "(" or "[" in the prefix field when creating the citation. I've double checked that I have done so and haven't accidentally inserted an additional space after this character. Despite this fact, however, prefixes ending in opening parentheses or opening square brackets now seem to result in the following output:
. . . ( Roberts, Donaldson, and Coxe, Ante-Nicene Fathers, 2:427)
or:
. . . [ Roberts, Donaldson, and Coxe, Ante-Nicene Fathers, 2:427]
Any suggestions or solutions you might have would be most helpful!

P.S.: Would this adjustment have anything to do with the situation I'm describing above?: https://forums.zotero.org/discussion/37875/citeprocjs-should-add-a-whitespace-after-a-prefixbefore-a-suffix-in-more-cases/
  • yes, this has nothing to do with the style, but is the result of that adjustment in the citation processor. We'll need to add some exceptions:
    I'm thinking " ' (as well as their smart opening versions) ( [ and, probably for completeness, ¿¡
    Anything else?
  • In paging through a sample essay, it looks like I'm only seeing the additional spacing creep up after ( and [. So, at least as I'm accustomed to working, the fuller list of characters you've suggested should do the trick in these cases and catch still more for other users besides.

    Thank you so much!
  • I´ll post here once this is in the processor update. I hope we can get this in to the next Zotero version.
  • Thank you, again.
  • edited September 25, 2014
    This was a straight-up coding error on my part. Here is what was supposed to happen.

    For testing, we start by stripping the prefix string of CSL markup (<i></i> etc.), straight single- and double-quotes, right-side single- and double-quotes, and trailing space.

    We should then have been adding a space when the test string: (1) ends in a roman-or-similar character; or (2) ends in a terminal character—otherwise there should be no space. Terminal characters are currently set to be: :, ., ;, !, and ?.

    Thanks to the coding mistake, the test at (1) was working correctly, but the test at (2) was applying a space unless the prefix string ended in colon. Which was, um, totally wrong.

    If the test above is fixed, opening parens and brackets work correctly (they don't attract a space because they are not roman-ish characters, and are not in the terminal-punctuation list). However, closing parens and brackets also don't get a space. I'm thinking those should be added to the list.

    That should get these characters working correctly as well:
    I'm thinking " ' (as well as their smart opening versions) ( [ and, probably for completeness, ¿¡
    Closing brackets and parens test okay. Inverted exclamation and question marks would be unusual as an opening for a citation, but they will attract no space. The various forms of single- and double-quotes are just ignored, and we look at the character behind them instead.

    If I fix the code and add closing parens and brackets to the test, I think we should be good, but let me know if you spot any problems with that. When I get a revision bundled up, I'll post back with a link to the patch plugin for testing.

    EDIT: The comma should also be in that list, and the automagic capitalization of terms should happen only following characters in the existing list; comma and closing parens or brackets should not trigger term capitalization.

    EDIT2: Should also strip ordinary and thin non-breaking spaces and right-side guillmet, and treat numeric characters on the same basis as alphabetic (i.e. attracting a space, but not forcing term capitalization).
  • edited September 26, 2014
    You can try the amended processor by installing the processor patch plugin. Its only effect is to swap in the latest processor version, and you can (and should) disable or remove it when the next Zotero release comes out.

    EDIT: As adamsmith notes below, the plugin works with Zotero for Firefox only.
  • (note that, unless Frank has changed something, the plugin will only work on Zotero for Firefox).
Sign In or Register to comment.