Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Titles of articles I'm about to cite contain uppercase letters and when using BibTeX it converts them in lowercase ones. This happens only in title and only first letter conserves it's case. For example, when I cite article about HF, reader won't know if it is about Hafnium or fluorine acid.

I know that I can fix it manually in .bbl file but I'd like to avoid it, or fix it automatically.

Thanks for any suggestions.

share|improve this question
    
@Allan: Thanks for corrections. –  Crowley Feb 22 '11 at 20:47
add comment

6 Answers

up vote 31 down vote accepted

This is not a bug; it's a feature. BibTeX converts all characters in the title to lowercase, with the exception of the first character. If you want to override this, wrap the character(s) in curly brackets, e.g.,

title = "Pascal, {C}, {Java}: were they all conceived in {ETH}?"

share|improve this answer
10  
Well, bibtex does not always do this. Certain .bst files can choose to convert to ALL UPPERCASE, or to leave the capitalisation exactly as it was entered in the .bib file. –  Lev Bishop Feb 10 '11 at 19:19
    
thanks for advice. It works as I need. –  Crowley Feb 10 '11 at 20:37
1  
Incidentally, you should nearly always capitalise the subtitle, and I recommend capitalising all significant words, to allow for bibliography styles that want this. Then you get: title = "Pascal, {C}, {Java}: {Were} they all Conceived in {ETH}?" –  Charles Stewart Feb 11 '11 at 9:38
    
Read the instractions if everyting else fails. –  Igor Kotelnikov Mar 1 '11 at 15:28
add comment

The loss of capitalization is by design: BibTeX does this because some, but not all citation styles require capitalization in titles (a.k.a. "title case"); other styles use ordinary case. BibTeX's approach works as follows: You must write the title in the capitalized form, and your bst style either keeps it this way or converts it to lower case. Lower-casing works indiscriminately-- BibTeX does not try to guess which words are proper names, acronyms etc. (note that even letters in the middle of words get lower-cased). So to protect words that should always be capitalized, you enclose them in braces.

In short, titles should be formatted like this:

title = {A Short Grammar of {Middle} {English}: Graphemics, Phonemics and Morphemics}

NB: regular words must be capitalized, but not enclosed in braces. This is the only form that will work correctly with either citation style. With styles that use title case, it will appear as written (except for the braces). In citation styles that lowercase titles, it will appear as A short grammar of Middle English: Graphemics, phonemics and morphemics.

Notes:

  1. I've added this answer because all the existing answers are incomplete in my opinion: They show how to block BibTeX's lowercasing behavior, but not what it's for or how to use it properly. Even reputable references give bad advice in this respect.

  2. Although the BibTeX documentation suggests enclosing only the first letter in braces ({M}iddle {E}nglish), this interferes with proper kerning between letters and should be avoided. E.g., compare the spacing of Fo in {Font} (top: correct) and {F}ont (bottom: wrong).

    enter image description here

  3. Even the most careful authors will probably miss some capitals if their usual bst style lowercases everything, or some braces if it doesn't; so if you switch to a new style with different capitalization conventions, inspect your references carefully.

  4. There are in fact multiple styles of "title case", as detailed in this article. BibTeX cannot distinguish them: Either it preserves your title case or it doesn't. So choose one title-casing style, and use it in your titles.

  5. Watch out if you need braces in a title for other reasons: They will block lowercasing too, and title = "All About \emph{About}" will come out as All about \emph{About}. BibTeX actually used to deal with this properly: it will lowercase inside braces if they're immediately followed by a macro, as in old-style font commands like {\em About\/}. Unfortunately, this built-in behavior is no help with the modern syntax. You can still benefit from it, though, if you remember to type \emph{\relax About}. (Any command will work in place of \relax, as long as it immediately follows the offending brace.)

share|improve this answer
    
Can you elaborate on 2.: Do you have a reference for the kerning problem? Or even an example? So far, I always only enclosed the first letter. –  boothby81 Oct 24 '13 at 11:43
    
Good question! I'm not sure where I read about it; at the moment I can only refer you to the discussion below Stefan Kottwitz's and Alan Munn's answers in this thread-- obviously I'm taking Stefan to be correct. The DIY example he suggests: "compare {T}ext to {Text} - the kerning between T and e." –  alexis Oct 24 '13 at 13:12
    
PS. @StefanKottwitz, would you know of a document or tex.sx answer where the kerning issue is addressed properly? :-) I've been unable to google my way to one so far... –  alexis Oct 24 '13 at 13:17
    
@boothby81, I've constructed my own demonstration of the kerning problem, see above. –  alexis Nov 15 '13 at 13:47
1  
It's not just words that should always be capitalised. For example, "pH" should never be PH even in title case, the the lower case needs protecting. –  Chris H Nov 15 '13 at 13:56
show 1 more comment

As others have noted, lowercase titles is a feature an not a bug, the idea being that the bibliography style is responsible for capitalizing or not title words according to the particular style it implements. However, there are obviously places where this is not what you want, as you have found: acronyms, proper names etc. in titles.

The general rule for solving this problem is to enclose the elements that must always be capitalized in {...}. However, as a rule of thumb, you should always enclose the smallest possible part. For example:

title = "A comparison of {P}ascal, {A}da, and {BASIC}"
title = "A biography of {E. M.} {F}orster"

not

title = "A comparison of {Pascal}, {Ada} and {BASIC}"
title = "A biography of {E. M.} {Forster}"

The reason for not surrounding the whole word in {...} is that the braces will also prevent hyphenation of that word. So it's best just to surround the smallest stretch of a word that needs to remain capiatalized. For proper names, this will generally be the first letter; for acronyms or chemical formulas it will be the whole thing.

share|improve this answer
6  
I could give an example where hyphenation works within braces. And compare {T}ext to {Text} - the kerning between T and e. –  Stefan Kottwitz Feb 10 '11 at 20:50
add comment

If you do want to change all the bibliography entries then you can modify your style file. Copy it to mybst.bst and then edit the file to modify the function format.title to:

FUNCTION {format.title}
{ 
% title empty$
%    { "" }
%    { title "t" change.case$ }
%  if$
title
}

Then it didn't change the uppercase letters. Save the new file into your documents directory and try it. If it works, then you can move it into the local texmf tree.

share|improve this answer
add comment

The canonical reference for this kind of thing is Nicolas Markey's Tame the BeaST. For your example of HF, enter it as {HF} to keep the capitalisation.

Generally, it's better to only put the braces around the minimum part that needs fixed capitalization. Some publications want all UPPER CASE, some want Title Case, some want Sentence case. So for most flexibility an article about Hafnium and hydrofluoric acid should be entered as title = {The effects of {HF} on {Hf}}

share|improve this answer
1  
@Crowley: btw. texdoc ttb may open the mentioned document for you, it does so on my TeX Live 2009 system. –  Stefan Kottwitz Feb 10 '11 at 19:15
add comment

You could protect your titles by using additional braces: title = "{About HF}".

share|improve this answer
    
I would only put the braces around the HF. –  Lev Bishop Feb 10 '11 at 19:15
3  
@Lev: In that case just around HF is ok. I would just not put braces around letters or parts of words, to preserve the kerning, so perhaps around whole words. It's not necessary to do it for a complete title. –  Stefan Kottwitz Feb 10 '11 at 19:19
3  
But if you put braces around whole words you lose hyphenation which seems like a worse thing to lose than kerning. –  Alan Munn Feb 10 '11 at 19:32
3  
@Alan: Braces don't need to prevent hyphenation. I verified it: also within a bibliography, words within braces in a BiBTeX's title were hyphenated. –  Stefan Kottwitz Feb 10 '11 at 20:03
    
Thanks for answer and this discussion. –  Crowley Feb 10 '11 at 20:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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