blank space issues

Since I have upgraded to 2.1 I am experiencing a number of problems with blank spaces either missing or being inserted where they shouldn't be:

- there are now automatic blank spaces between suffixes/prefixes and the actual citation (using intext-styles). I'm not sure if that could be problematic with prefixes, but when I want to start the suffix with a comma, for instance, I don't want the blank space, e.g.: (Brown 1980, orig. emph.) -- right now I get a blank space between year and comma. This seems to be independent of the used style

- ASA-style puts page numbers of book chapters right after the chapter title. Right now it doesn't put a blank space between title and pp., so that it looks like: "title"Pp. 20-30

- Harvard initializes first names, but doesn't put a blank space between initials of author names, so that it looks like: Adam, B.D. It does put in a blank space for editor names. (I checked, my database entry has a blank between the first names)

While the latter two issues seem to be style specific, I think these problems didn't extist before the upgrade, at least I'm quite sure about the ASA-issue. I wonder if these are a matter of adapting styles or a problem of how they are rendered?

(LO 3.3.1, FF4, Z2.1.1, LO-plugin 3.5a1, Ubuntu 10.10)
  • The first issue bugs me too. I often have to put a colon comma or nonbreaking space in front of the suffix. As far as I can see it's impossible to control this behavior through the style? If that's right it clearly needs to be changed.
  • agreed - it's also affects backward compatibility of old documents - I suggest getting rid of it for both prefix and suffix.
  • Understood; I'll get rid of the spacing nannyism around prefix and suffix. I'll look into the spacing issue with ASA and the discrepant formatting of author and editor names, and post back here.
  • Frank, it's been a while but I believe that in Zotero 2.0, a space was only added after/before the prefix/suffix if the last/first character of the prefix/suffix was alphanumeric. Otherwise, the space was added. I previously did this by using [A-Za-z0-9], which is really not the right way of testing for an alphanumeric character, but perhaps we could look for all [\x00-\x2F\x3A-\x40\x5B-\x60\x7B-\x7F] and suppress the space if that regexp matches the character (or use a similar set of ranges implemented with fromCharCode()).
  • edited March 25, 2011
    I've done something pretty close to that in the fix (sorry for not posting back as promised -- I must have either forgotten to hit the send button, or posted to another thread). The diffs are here:

    https://bitbucket.org/fbennett/citeproc-js/changeset/c9b9dfd4b6b6
    https://bitbucket.org/fbennett/citeproc-js/changeset/c64e8972f3f2

    I've included terminal punctuation in the test of prefixes, but if there is a space at the end of the string already, no additional space will be added. This figures in the 1.0.129 release, pushed yesterday. Does it look about right?

    (Among the other issues in the thread, the bug that caused the loss of a space in ASA has been fixed in the same checkin, and the Harvard 1 problem is a style issue -- the style currently applies initialize-with=". " for one name variable, and initialize-with="." for the other. If that's fixed in the style, the behavior will be consistent -- although I'm not sure which behavior is correct for that style.)
  • Looks good to me.
  • What if I need this now? Could I switch to the multilingual version to get it fixed?
  • Thanks! Do I also need to update the word processor integration to trunk, as that page somewhat ambiguously seems to suggest, or can I stay with 31b1?
  • You can stay on the release version of the integration plugin. I'll clarify the page.
  • Hey, looks very nice. Thanks! But I still have a small problem. I sometimes need a non-breaking-space (ALT + 255) at the beginning of the suffix. In this case there's still another (normal) space added, which shouldn't be the case.
Sign In or Register to comment.