362

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

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

4
  • 3
    For the special case of chemical formulas I suggest to use \usepackage{mhchem} and write in the .bib file \ce{HF6Hf2}. Commented May 21, 2017 at 11:53
  • 4
    Is there any way to enforce Bibtex to just use the bibtex file AS IS??? Lev Bishop writes that "certain bst styles" leave everything as it should. Which? How? Thanks for an answer. This IS a bug, not a feature. Who on earth needs that? Why? (alexis is unconvincing)
    – Michael
    Commented Aug 4, 2020 at 6:09
  • @michael, a bit late for you but you didn't tag me so I never saw this before :-) People need the case-folding feature if they work in a field where both capitalization conventions are used. 1 minute of googling found me this review of citation styles on scribd, which includes this handy side-by-side comparison of APA vs. MLA style. Both are common in the humanities, but one capitalizes titles and one does not. Convinced yet?
    – alexis
    Commented Dec 28, 2022 at 9:25
  • "enforce Bibtex to just use the bibtex file AS IS" means use any style that capitalizes titles. I would spend another minute to find a bibstyle that does not fold capitalization, but that won't do anybody any good -- you need a style that matches the rest of your field's (or your publisher's) bibliographic conventions.
    – alexis
    Commented Dec 28, 2022 at 9:27

6 Answers 6

375

This is not a bug; it's a feature. Depending on the bibliography style in use, 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 braces, e.g.,

title = "Pascal, {C}, {Java}: were they all conceived in {ETH}?"
11
  • 36
    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
    Commented Feb 10, 2011 at 19:19
  • 4
    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}?" Commented Feb 11, 2011 at 9:38
  • 53
    This is a crappy and annoying "feature" for people that want their titles to appear as they typed them. I have 100s of references that I have to manually add { } to, even though I carefully typed the titles already. Other styles e.g. rsc and asochem don't do this--but I need the APA style.
    – khaverim
    Commented Jan 9, 2018 at 23:03
  • 5
    @khaverim no need for doing it manually... you can use regexes to do that manually. title=\{([^{]+)\} matches titles with a single pair of {} around them and should be replaced with title={{\1}}. Might need some more love to catch all possible whitespaces and usage of " instead of {} but it's a start :)
    – stefanct
    Commented Feb 8, 2018 at 18:55
  • 1
    @Laura: I was/am using Geany for such things (and pretty much everything else that is related to text files). I don't know bibdesk but debugging regex replacements is usually a two-step operation for me: 1. check that the search expression matches all required text, 2. ensure that the back-reference in the replacement text is working correctly. Possible problem areas often include escaping and line endings. Sorry for not being more specific. Maybe ask a dedicated question for bibdesk with some example input.
    – stefanct
    Commented Oct 1, 2018 at 8:47
184

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. Your bibliography database should work with both capitalization styles without modification, so BibTeX styles are designed to work 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). To protect words that should always be capitalized, you enclose them in braces.

Tl;dnr: Regardless of the capitalization style you want to see in your references, capitalize all content words in titles, and enclose proper names and the like in braces. 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).

    images of "Font" with kerning

  3. 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.)

  4. 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.

  5. 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.

18
  • 2
    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
    Commented Oct 24, 2013 at 11:43
  • 3
    @boothby81, I've constructed my own demonstration of the kerning problem, see above.
    – alexis
    Commented Nov 15, 2013 at 13:47
  • 4
    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
    Commented Nov 15, 2013 at 13:56
  • 3
    Actually, capital letters anywhere in the word must be protected, but the small "p" in "pH" does not need protection: Bibtex only changes upper case in titles to lower, never the reverse.
    – alexis
    Commented Mar 3, 2015 at 0:17
  • 3
    AFAIK, {M}iddle {E}nglish is most versatile—it even works with uppercase style. The kerning problem is not present with XeTeX or LuaTeX. If one works with pdfTeX and will never use uppercase style, it is good to use {Middle}; otherwise {M}iddle is better.
    – Eli4ph
    Commented Nov 23, 2020 at 9:20
63

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.

Various styles can be downloaded from CTAN.

2
  • 11
    This is so far the best answer to this annoying bibtex styles "feature". Fortunately with biblatex we don't have to deal with this anymore.
    – user9424
    Commented Jul 30, 2015 at 10:56
  • 1
    @Joseph, it's annoying all right but it's a life-saver when you need to produce a bibliography in the opposite capitalization style from what you are used to. IF you've coded your bibliography to take advantage of this feature.
    – alexis
    Commented Nov 30, 2015 at 19:51
27

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

4
  • 6
    @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
    Commented Feb 10, 2011 at 19:19
  • 4
    But if you put braces around whole words you lose hyphenation which seems like a worse thing to lose than kerning.
    – Alan Munn
    Commented Feb 10, 2011 at 19:32
  • 7
    @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
    Commented Feb 10, 2011 at 20:03
  • I needed two pairs of curly braces around the title to make this work in my setup. Hypenation works as expected. Commented Dec 16, 2018 at 15:09
21

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}}

1
  • 3
    @Crowley: btw. texdoc ttb may open the mentioned document for you, it does so on my TeX Live 2009 system.
    – Stefan Kottwitz
    Commented Feb 10, 2011 at 19:15
19

A neat trick to get the WYSIWYG effect in the titles of your bibtex is to use double curlies to encode the titles, e.g.:

@book{aitchison2001language,
  title={{Language Change: Progress or Decay?}},
  author={Aitchison, Jean},
  year={2001},
  publisher={Cambridge University Press}
}
15
  • 4
    Wouldn't it suppress correct "capitalize all " when needed?
    – Crowley
    Commented Apr 7, 2015 at 13:29
  • 3
    It's a WYSIWYG effect, so if capitalize all is needed you need to see all caps to get all caps =)
    – alvas
    Commented Apr 7, 2015 at 13:59
  • 1
    This used to be the way to fix the problem of badly-written journal capitalization schemes interfering with your carefully-types title. Now I see biblatex overrides the double-curlies trick, at least when using IEEE (I haven't tested all the others yet). This is a bug, not a feature: it should honor this technique: if the .bib file is being generated from (correctly-capitalized) sources elsewhere, it is usually not possible to add curly braces around individual capitals. Commented Jan 1, 2018 at 23:00
  • @PeterFlynn I just tested the example and a few others with biblatex's standard styles (with sentence casing enabled) and biblatex-ieee and got the expected WYSIWYG result. If you get a different result then this could indeed be a bug, please report it at the biblatex bug tracker github.com/plk/biblatex/issues.
    – moewe
    Commented May 22, 2018 at 5:52
  • 2
    FWIW I think this is a bad approach. If you don't want the case changed, use a style that does not change the title to sentence case. Choosing this approach with styles that require sentence case (like APA) means that you do not conform to the style guide.
    – moewe
    Commented May 22, 2018 at 5:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .