My understanding is that bibtex lets the citation style handle capitalization of titles, which is what I would expect from an automated citation tool. Do biblatex and Biber also do this? The document I am working on with these tools seems to be preserving the capitalization in the bib database, which is NOT what I want, and I haven't found any clear references that explain what the expected behavior is.
-
1How are you calling biblatex?– egregJun 9, 2011 at 17:18
-
This is really frustrating. I have hundrets of bib entries and I want title case. It seems like Biblatex only supports either "no styling" (which means inconsistent styling or hours of manual work) or sentence case. Sentence case also converts conference names and everything into sentence case, which I don't want (would need hours of manual escaping)...– CGFoXFeb 4, 2021 at 14:22
2 Answers
It might depend on the style and language(s) you are using, but generally titles are printed in the field format titlecase
. By default, titlecase
has no effect on casing; from biblatex.def
:
\DeclareFieldFormat{titlecase}{#1}
If you want all titles in sentence case (i.e. first letter capitalized, the rest in lowercase) you can redefine this format:
\DeclareFieldFormat{titlecase}{\MakeSentenceCase*{#1}}
The \MakeSentenceCase*
command converts its argument to sentence case, except for text enclosed in braces ({}
). It also generally has no effect on control sequences. However Latin characters in math ($...$
or \(...\)
) are affected and control sequences in $...$
generate parsing errors. To avoid these issues all math can be wrapped in braces. Wrapping a single character in braces affects its kerning, so the biblatex
manual recommends wrapping braces around entire words. For example:
title = {An Introduction to {LaTeX}}
instead of:
title = {An Introduction to {L}a{T}e{X}}
You can make casing depend on the entry type(s) by adding an optional argument - for example:
\DeclareFieldFormat[article]{titlecase}{\MakeSentenceCase*{#1}}
One catch here is that the titlecase
format is rolled out to all titles within an entry type. So in the above example both the title
and journaltitle
fields would be printed in sentence case. This question addresses how to make title case depend on both the entry and field types.
\DeclareCaseLangs
specifies all the languages that the starred version \MakeSentenceCase*
converts to sentence case. By default we have:
\DeclareCaseLangs{%
american,british,canadian,english,australian,newzealand,USenglish,UKenglish}
For further details, see biblatex
documentation on the above commands and release notes under the heading "Sentence case vs. title case".
edit by @moewe: The
biblatex
documentation recommends the starred version\MakeSentenceCase*
over the unstarred\MakeSentenceCase
.The starred version
\MakeSentenceCase*
only applies sentence casing of the language of the entry (as given in thelangid
field or if it is empty, the surrounding language) is in the list of languages where sentence casing makes sense (as defined by\DeclareCaseLangs
).
\MakeSentenceCase
applies sentence casing regardless of the language settings and may result in unwanted capitalisation changes in non-English contexts (German for example has no notion of Title Case vs sentence case and English sentence casing as implemented in\MakeSentenceCase
would lead violate the rules of orthography).
-
1@Audrey I'm seeing the same thing that Jonathan was seeing ("...document I am working on with these tools seems to be preserving the capitalization in the bib database, which is NOT what I want..."), and I'm sorry to say that I don't quite understand your answer as well as he seems to. I'm finding that whatever text I enter in the title field is typeset exactly as entered in the .bib database (even first character) which seems to differ from what you're saying with sentence case and titlecase above. Shouldn't biblatex (called with \printbibliography) just typeset the bibliography correctly? Nov 7, 2012 at 22:09
-
1@TeXnewbie The default
titlecase
format doesn't change casing. If you want all titles in sentence case, just add\DeclareFieldFormat{titlecase}{\MakeSentenceCase{#1}}
to your preamble.– AudreyNov 8, 2012 at 3:00 -
1Thanks @Audrey that helped me understand your answer better. So there is the default (do nothing to change case), and there is SentenceCase (Only first letter of first word of title capitalized), but what about title case capitalization (Each Word of Title Capitalized Except for Words Like 'of' 'and' 'for' et. al.)? I looked at documentation and release notes for
biblatex
as you suggested ("Sentence case vs. title case"), but I see nothing describing how to getbiblatex
to typeset a title (eg. for a book) using Title Case. Am I missing something? Is that determined by thedocumentclass
? Nov 8, 2012 at 20:38 -
1@TeXnewbie That is referred to as "title case". biblatex doesn't offer a title case macro. If you use title case, you can apply it throughout your bib file and use
\MakeSentenceCase
whenever needed. Macros to apply title case are available, though biber's sourcemap feature might be better for this job.– AudreyNov 9, 2012 at 0:48 -
1@PatrickT
biblatex
only has a macro to convert text to sentence case. There is no command to convert anything to Title Case. The implicit assumption is that people store titles in Title Case and that a style can convert titles to sentence case if need be. (BibTeX works similarly.) Hence there is no\MakeTitleCase
and\DeclareFieldFormat{titlecase}{#1}
simply disables sentence casing.apacase
instead oftitlecase
is a design decision ofbiblatex-apa
. All standard styles usetitlecase
, butbiblatex-apa
has more complex rules and usesapacase
.– moeweApr 1, 2019 at 10:06
If you are using biblatex
with style=apa
and want to keep the casing of your bib
-file you need to use
\DeclareFieldFormat{apacase}{#1}
The default is to capitalize only the first letter.
-
1
-
1
-