Quick Links

[Beta] Capitalization after Colons

I'd like Zotero folks to rethink this feature. Every journal style I know of requires journal titles in a bibliography to be in sentence case, with a lowercase word following a colon (unless that word is a proper noun). Making this the default behavior for this item type seems like a step backwards. Almost every time I switch the case automatically (usually as the result of an item that was imported in title case, which happens a lot) and there's a colon in a paper I'd need to change the capital letter to lowercase.

Could this behavior be turned off in the case of journal articles? Alternatively, could we get the ability, perhaps in a hidden preference, to not capitalize after colons? The second way would require manual editing for books or other item types, but for those of us for whose library the vast majority of items are journal articles, it would save a huge amount of manual editing.

Every journal style I know of requires journal titles in a bibliography to be in sentence case, with a lowercase word following a colon (unless that word is a proper noun).

since every journal broadly following APA style does require capitalization after colons in sentence case. But indeed, Vancouver-inspired citation styles do not. Not sure what the better solution is. There is not much enthusiasm for a proliferation of hidden preferences.

If not a hidden preference, how about a displayed preference in the gears menu? This seems like one case where there is a large enough user base on each side of the preference to justify it being a choice option.

I don't actually know how many people use the function. I doubt it's very many since it's rather hidden. It'd be nice to change that, too, but not sure how. Beyond that, it's a bit hard to explain in a preference in a way that makes clear to users that it refers to the right-click function and not automatically generated citation styles. I'm not saying no to any of these (except for treating Journal Articles differently. That's just confusing and not going to happen), but I'm currently not sure how a decent solution would look like.

I see. I wasn't aware of the format of APA-based styles. If the division is that great, then perhaps it should be a regular preference and not a hidden one.

Still, I don't really understand the rationale for this change. After all, if the style calls for capitalization after a colon, the CSL already converts it, right? So why wouldn't you want to store it as a lowercase, and let the style handle any conversions to capitals as necessary, which would maintain the ability for those styles that don't use capitalization to be correct?

You can't just do the conversion the other way, either. For example, a paper like:

Would it be possible to add a "Change Case" button next to title fields? Word, for example, uses the symbol [Aa▼] as the change case button. Even just having the choice arrow like creators would visually indicate that something is actionable for title fields.

I agree about the preference being confusing if the function is not prominently displayed. However, if there is a button for calling the Transform Text function in the metadata pane, would a preference for "Capitalize titles after colons when changing case" be less confusing?

As an alternative, could this preference be a check box in the Transform Text dialog itself? I'm not sure if Mozilla supports this kind of interface.

Given that there is a difference between different styles, this should not be handled in Zotero itself. I.e. Zotero's fields should be entered in pure sentence case. In fact, in the future, I would argue that any styling, unless explicit (like proper nouns, species names, etc.) should not be handled in Zotero. This should be handled within the CSL processor, which can properly decide if the word should be capitalized or not based on style being used.

I was thinking about this and I agree with Aurimas. We should fix that in CSL. Since it's English only we can apply the same routine as for title casing and use language codes to disable the functionality. That will take some time.

Would it be possible to add a "Change Case" button next to title fields?

Would it be possible to add a "Change Case" button next to title fields?

I think is a good idea either way, though.

Making these functions more apparent would be good. What I have in mind though is that we display a formatting popup right above the field when each of the fields is being edited (similar to Word's formatting popup that's displayed when you select some text).

To implement this, however, I think we should first implement rich text editing in fields with an option (on the pop-up) to switch to raw HTML view, just like we do in Notes (and we could probably even use TinyMCE to accomplish all of this)

Some great ideas here. And since there seems to be consensus building around storing titles in pure sentence case, can we agree to revert to the previous capitalization styling? After all, we wouldn't want to encourage one method, only to change it later...at least if we can help it.

I also should probably add that capitalization after colons is the only thing at issue here. All styles capitalize after ? and ! in titles -- as does proper sentence case, I assume, since they're delimiters of new sentences anyway -- so that functionality should definitely remain.

I'm sorry to say that I didn't get to this before the release, which looks like it is about to happen. I agree with you entirely and will revert that change for the next version, sad as that is going to make me and everyone using APA. (And let me underline those are two separate groups...)Unfortunately the discussion about the details of handling this in citation styles has stalled to some degree, but I'll try to revive it once the next CSL version comes into sight. For those interested, it's here: http://xbiblio-devel.2463403.n2.nabble.com/Sentence-case-variants-td7578968.html

Just my two cents as someone who is also interested in the APA-like capitalisation behaviour. I am also wondering whether adding a hidden preference for this would be a possibility?

I fully understand that it is generally desirable to avoid a proliferation of hidden preferences as much as possible (as mentioned by adamsmith earlier). However, considering that the code for both behaviours exists then considering that a fix via CSL is unlikely to happen anytime soon, this would seem like a very good temporary solution (unless the preference would be time-consuming to implement).

I have to admit that I am not familiar with the concept of a processor patch plugin (I'm quite new to Zotero), but anything that enables the alternative behaviour sounds tempting! If it is a separate plugin and hence maintained separately, my only question/concern would be compatibility, i.e., how likely would the plugin be to break / cause issues with minor and/or major Zotero updates?

It's pretty safe and stable. It's a Firefox-only plugin, so you would not be able to use it with Standalone. But the plugin is already available, and has been used many times. I just need to the tweak the title case function a little and make a release. Should be able to do that tomorrow.

The hidden pref would be, as I say in reference to the add-on idea above - pretty trivial to code, but I don't think Dan would accept it into Zotero, especially because there is a proper solution for the issue that will be implemented in the medium/long run - sorry.

As for the patch add-on: I'm a little wary of what that's going to do. I realize it's just a plugin, but in order to work with styles from the CSL repository, it would have to transform titles with no title-case attribute set. That seems rather odd to me and I think to hackish even as a stop-gap. @Frank - didn't you say there is a way to use subtitles in citeproc? Is that exposed in the official version? If so, I'd suggest putting together an unofficial APA style that uses that and people like bwiernik and ttamm could use that - since that's most likely also going to be the route we'll eventually go with this that seems like a lot cleaner solution.

I've been trying to locate the processor gadget in Firefox add-ons with no success. I'm not sure how this plugin works - does it just convert items when they're cited or can it change the source in the database?
Is there any way of using the transform text option to sentence case to capitalize the first letter of the first word after a colon (APA style)? Going through all my references manually, transforming text to sentence case is slow enough. Then adding the capitalization really is tedious.

It took me half a year to get there, but a plugin for this now exists.

It doesn't add anything to the UI. When the plugin is installed and enabled, it will uppercase the first character of the subtitle (the portion of the title after the first colon) if and only if the Short Title field exactly matches the main title (the portion before the first colon). The upper-casing happens in rendered citations: in accordance with the consensus reached in the thread, subtitles entered in sentence case, with the first character in lower-case, will be left as is in Zotero proper.

This isn't a complete solution, since the upper-casing will take effect indiscriminately for all styles; but the small extension that it adds to the CSL processor can be invoked more selectively when control over this is added to the CSL language at a later date.

Since it's English only we can apply the same routine as for title casing and use language codes to disable the functionality.

I've initially set it up to apply upper-casing unconditionally. Should it be restricted to English items only? Or to styles with an English locale?

Frank: didn't you say there is a way to use subtitles in citeproc? Is that exposed in the official version? If so, I'd suggest putting together an unofficial APA style that uses that and people like bwiernik and ttamm could use that - since that's most likely also going to be the route we'll eventually go with this that seems like a lot cleaner solution.

This piggy-backs on the subtitle code. That's not enabled by default, since title-main and title-sub are not valid CSL variables, but I've turned it on in the plugin, and added another snippet to upper-case that first character in the subtitle, and to recompose the main title variable.

Entering the main title exactly in the Short Title field comes from a suggestion Dan Stillman made when the need for discrete treatment of subtitles was discussed, quite awhile back.

This piggy-backs on the subtitle code. That's not enabled by default, since title-main and title-sub are not valid CSL variables, but I've turned it on in the plugin, and added another snippet to upper-case that first character in the subtitle, and to recompose the main title variable.

OK, I'll play with this and then bring a proposal about handling this in the next CSL version to xbiblio. (Turns out by the way, that there's a fourth capitalization variant, common in the UK: you title case, but don't capitalize the first letter of the substitle if it wouldn't otherwise be capitalized).