What is the proper casing to use when storing titles in the bibliography database? There are two options:

(a) Store titles in Title Case. Convert to Sentence case when a style asks for it.
title = {This is a Title in Title Case},
In this case, one would need to make sure to protect acronyms, names, and other never-to-lower-case-words with extra {Braces}. It is also necessary to put braces around foreign language titles that are not supposed to be converted.

(b) Store titles in Sentence case. Convert to Title Case when a style asks for it.
title = {This is a title in sentence case},
This solution requires the language field to have the right value so that foreign language titles don't get capitalized by accident.

There are many posts on this site suggesting that from a Bib(La)TeX perspective, option (a) is clearly the preferred one. See here, here, here, and here.

On the other hand, tools like Zotero seem to work under the assumption that conversion of sentence case to title case is easier to automate than the reverse -- see here or here -- and hence recommend option (b).

Would anyone with some background knowledge on these issues be able to explain why/when one should choose one over the other? Why is (a) mostly referred to as the option of choice here?

To judge from the arguments on the Zotero forums, option (b) while using the language field seems to be a more robust approach -- as one wouldn't have to do as much manual editing of the bib file.

Yet, I must say, so far I've been faring very well with option (a), both, while using BibLaTeX as well as when exporting to other formats (e.g., pandoc-citeproc using the --biblatex flag works flawlessly), despite the extra work in adding additional braces to uppercase words. But, as I'm currently about to do some major updates to my bib database, and since the Zotero people seem to be so adamant against storing titles in title case and given that it would be nice to avoid having to add all those braces, I'm second guessing myself and wondering if I should take the time to update my workflows?

Any expert knowledge would be highly appreciated.

  • 3
    Both biblatex and BibTeX can only convert a given string to sentence case. So for the TeX world the save as Title Case and convert to sentence case is the usual solution. – moewe Jul 5 '18 at 21:59

The LaTeX approach to title casing

Both BibTeX and biblatex have functions to convert Title Case (or basically anything) to Sentence case, but not the other way round. So in the LaTeX world the advice would have to be

Save your fields in Title Case and protect proper nouns and other words whose case cannot be changed by braces. The style will then apply Sentence casing when needed.

As a matter of fact, when using biblatex you should also populate the langid field (not language here), because some languages don't have a Title Case-Sentence case distinction and in those cases you would not want to convert the title at all (German comes to mind where capitalisation can't be changed, but also other languages that don't have a tradition of Title Case or where Title Case should always be used for titles and Sentence case is not an option). Most BibTeX (.bst) styles are more radical and usually do not take the language into account when converting case.

Now why BibTeX/biblatex and Zotero come to basically the opposite conclusion as to what should be stored I can't say for certain, but I assume it is partly caused by BibTeX being developed more than thirty years ago now and maybe also by a bias towards the English language (it would be unfair to say that BibTeX does not care about other languages, after all it goes through great length to allow for accented characters, but fundamentally sorting and some other things are US-ASCII-centric).

Title Case to Sentence case

In principle the conversion from Title Case to Sentence case is simpler than the conversion the other way round. The simple rule is just to take the first letter and convert it to uppercase (alternatively, just leave it as is, because if the input follows either one of the two systems it would be uppercase anyway) and then convert all following characters to lowercase. Of course that destroys capitalisation of words that must always be capitalised even in Sentence case, so BibTeX has (to have) a way to protect these words from case changes. Protecting these words will almost surely require manual intervention.

BibTeX uses braces to protect words from case changes. Unfortunately, braces are also used to delimit macro arguments or group scope and are also used to mark up macro constructions for non-ASCII chars (cf. How to write “ä” and other umlauts and accented letters in bibliography?), so the whole things gets a bit confusing.

The BibTeX Frequently Asked Questions explain in Q5

The rules that govern all this are simple, but confusing. BibTeX considers everything within a {\ .. } construct at brace level 0 (and only brace level 0), that is the top level of bracing of the field (which is not affected by whether quotes or braces are used to delimit the entire field), to be a “special character” and will treat is though the entire construct is a single character. Within special characters, control sequences (LaTeX commands) will be preserved as is, but all other text may be case changed or otherwise processed as needed. Furthermore, within special characters, additional levels of braces do not increment the brace level. On the other hand, { .. } constructs at brace level 0 (the key here is that a \ does not immediately follow the opening brace — if so, it would make it a special character) do increment the brace level as well as do nested braces within them. All text and control sequences at brace level 1 or higher is protected from case changes or other processing.

If you want to know more about this, the answer to Q5 goes on to explain this with more examples. Ni­co­las Markey's Tame the BeaST also has something on this in §10 Titles. See also BibTeX loses capitals when creating .bbl file.

Aside: When you want to protect words from case change it is better to protect the entire word than to protect only one letter. The kerning might be destroyed by the latter. Compare title = {A Short History of {C}omic {S}ans {MS} or {T}he {F}ont of {D}oom}, and

title = {A Short History of {Comic} {Sans} {MS} or {The} {Font} of {Doom}},

Anyway, once BibTeX can keep track of brace levels and the difference between {\ .. } and { .. } the actual work required of it is actually quite straightforward and simple (if you keep in mind that BibTeX only does US-ASCII, where uppercase to lowercase conversion can be hard-coded).

Sentence case to Title Case

On the other hand Sentence case to Title Case requires a slightly more complex algorithm. Usually the rule is something like: Capitalise all words except for this list of words, which should remain in lowercase. So the implementation needs to be able to detect word boundaries or rather beginnings of words (not just the beginning of the string) and apply case change. Furthermore it needs a comprehensive list of all words that are to remain in lowercase (the user should be able to edit that list, since there are different levels of Title Case eagerness). Additionally, there needs to be a way to protect words from unwanted case change (probably much less frequently than in the Title Case to Sentence case conversion where proper nouns and related objects are effected, but I could think of Latin species names, where the first term is capitalised and the second in lower case).

Why did BibTeX and Zotero come to different conclusions?

Now comes a bit of speculation, but back in the mid-eighties when computing power and memory was slightly more limited (even today BibTeX only allows you to define 10 internal string variables) the Sentence case to Title Case conversion might have been seen as too costly or complicated or at least not worth the effort compared to the other solution.

It is true that from a user perspective Sentence case to Title Case is the more convenient method. It is less likely to require manual intervention than Title case to Sentence case (words that must remain lowercase and that don't match the list of exceptions are quite rare I assume) and it is easier to input (I don't have to think about whether or not "upon" should be capitalised or not in Sentence case). I guess LaTeX users are expected to be prepared for manual interventions if necessary, so the additional work of adding some protective braces does not seem too much of a burden.

All of this is mainly about English Sentence case, I don't have enough experience with other languages (apart from German where there is no such distinction) to be able to say more. A short internet search suggests French titling rules are mighty complex as well (maybe even so complicated that a simple Sentence case to Title Case converter would have to be extended quite a bit).

In the discussion I have restricted myself to BibTeX on the LaTeX side. biblatex uses a LaTeX implementation of BibTeX's case conversion that does not always give the exact same results, but follows the same ideas. That code is already quite complicated and I would not want to begin imagining how complex it would get if it were to implement a Sentence case to Title Case conversion - LaTeX is not great with arbitrary string manipulation. Plus biblatex aims to be as compatible with BibTeX as possible, so it seems a good idea to keep the same approach towards Title Case/Sentence case.

  • That's a thorough answer :) --- One additional question that might be useful to add above: Given what you explain about brace levels instead of title = {A Short History of {Comic} {Sans} {MS} or {The} {Font} of {Doom}}, wouldn't title = {A Short History of {Comic Sans MS} or {The Font} of {Doom}}, also do the job? Or even title = {A Short History of {Comic Sans MS or The Font of Doom}}, since "or" and "of" are lowercased always? Or is that not recommended? (and if so, why?) – jan Jul 6 '18 at 15:37
  • 2
    @jan I prefer to keep my braces as small and local as possible. I suppose I would be OK with {Comic Sans MS} instead of the excessive bracing in {Comic} {Sans} {MS}. But I would advise against title = {A Short History of {Comic Sans MS or The Font of Doom}}, because in my eyes it is too close to the WYSIWYG title = {{A Short History of Comic Sans MS or The Font of Doom}}, which should be avoided. – moewe Jul 6 '18 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.