scaps and Ticket #771

There has been periodic discussion regarding preservation of small caps when using the citation editor (See Ticket #771 from about 2 years ago). This problem persists with some styles such as Bluebook. In short, editing an inserted citation automatically removes small caps and inserts the code /scaps into the Zotero field as a replacement (in Word for me, and likely OO3 as well).

Might I make a gentle plea for some code changes to at least preserve the small-caps formatting that Zotero styles create? I'd gladly help if I had the skill to do so, but, as you can tell from my conditional tense, I can't manage this.


  • edited December 16, 2009
    I have uploaded a patch to ticket #771 that addresses this issue. The style editor needs to do bidirectional conversion between RTF markup and HTML, and the sticking point for a fix was that in HTML, small caps is done with a <span style="font-variant:small-caps"></span> tag set, the closing tag of which is not unique to small caps. The code I've added is sensitive to nested span tags, which should step around this problem.

    As this is a blocking issue for anyone using the Bluebook style, it would be very helpful if review of this patch could be prioritized.

    (EDIT: Took another look any my handiwork, and spotted a possible source of error with multiple nestings. The revised version just added to the ticket should be more trustworthy.)
  • Patch committed on the trunk. Thanks.

    As I noted in the commit message, we could actually have a button for small caps now that we use TinyMCE, but this may be sufficient.

    While testing (briefly), I also noticed that underline formatting set by the editor doesn't take. Ticket created, if anyone wants to have a look.
  • Excellent, thanks, Dan. I've uploaded a patch to the new ticket that seems to cover underlining, and should be extensible to cover any other markup that is based on span tags.
  • Thanks, Frank. Checked in.
Sign In or Register to comment.