3

I wish for entries in my bibliography to be set in sentence case. To do so I have been using \DeclareFieldFormat{titlecase}{\MakeSentenceCase*{#1}} in my preamble. I then use curly braces in my entries to preserve capitalisation for proper nouns and other words. However, this protection does not seem to effect single letters. Consider the following MWE:

\documentclass{article}

\usepackage{filecontents}
\usepackage[backend=biber, style=authoryear, maxbibnames=10]{biblatex}

\DeclareFieldFormat{titlecase}{\MakeSentenceCase*{#1}}

\begin{filecontents}{\jobname.bib}
@Article{     creutz88,
  Title     = {Global Monte Carlo algorithms for many-fermion systems},
  Author    = {Creutz, Michael},
  Journal   = {Physical Review {D}},
  Volume    = {38},
  Number    = {4},
  Pages     = {1228--1238},
  Year      = {1988},
  Publisher = {APS}
}
@Article{     metropolis49,
  Title     = {The monte carlo method},
  Author    = {Metropolis, Nicholas and Ulam, Stanislaw},
  Journal   = {Journal of the {American} Statistical Association},
  Volume    = {44},
  Number    = {247},
  Pages     = {335--341},
  Year      = {1949},
  Publisher = {Taylor \& Francis}
}
\end{filecontents}

\addbibresource{\jobname}

\begin{document}

Stanislaw Ulam was one of the original pioneers of Monte Carlo methods
\parencite{metropolis49}.

With a problem of dimension $d$, the computational expense of a random-walk
sampler is $O(d^2)$, whereas the cost of Hamiltonian Monte Carlo is roughly
$O(d^{5/4})$ \parencite{creutz88}.

\printbibliography

\end{document}

This produces the bibliography:

Creutz, Michael (1988). “Global monte carlo algorithms for many-fermion sys-
tems”. In: Physical review d 38.4, pp. 1228–1238.
Metropolis, Nicholas and Stanislaw Ulam (1949). “The monte carlo method”.
In: Journal of the American statistical association 44.247, pp. 335–341.

The entries are in sentence case as desired. And the capitalisation of American has been preserved, as intended. However, the capitalisation in Physical Review {D} has not been preserved.

So, how do I protect capitalisation of single letters in my bibliography? Or what is it that I'm misunderstanding in my current approach?

2 Answers 2

4

As mentioned in Kate's answer with a current version of biblatex and Biber the MWE as posted produces

Physical review D

for the journal title (I can believe that older versions of Biber inadvertently removed too many braces here: braces can mean a lot of different things in a .bib file and in some cases it makes sense to remove them, e.g. when they are used for legacy ASCII input as {\"a} for ä).

So the brace protection should work, but I would try to get around having to case protect journal titles in the first place.

While some styles require titles be given in sentence case that is usually not the case for journal titles, which are more akin to proper names. So I would argue that it is more natural to make sure that \MakeSentenceCase does not apply to journaltitle/journal. The standard styles have a catch all titlecase format, which makes that tricky, but the biblatex-ext styles offer more fine-grained control (see for example my answers to Sentence case for titles in biblatex and In biblatex, make title sentence case but not journal name, note that both questions have recieved other answers that don't use biblatex-ext as well, so if you don't like to switch to it, you may find one of the other answers helpful).

\documentclass{article}

\usepackage[backend=biber, style=ext-authoryear, maxbibnames=10]{biblatex}

\DeclareFieldFormat{titlecase}{\MakeSentenceCase*{#1}}
\DeclareFieldFormat{titlecase:journaltitle}{#1}

\begin{filecontents}{\jobname.bib}
@article{creutz88,
  title     = {Global {Monte Carlo} Algorithms for Many-Fermion Systems},
  author    = {Creutz, Michael},
  journal   = {Physical Review D},
  volume    = {38},
  number    = {4},
  pages     = {1228--1238},
  year      = {1988},
}
@article{metropolis49,
  title     = {The {Monte Carlo} Method},
  author    = {Metropolis, Nicholas and Ulam, Stanislaw},
  journal   = {Journal of the American Statistical Association},
  volume    = {44},
  number    = {247},
  pages     = {335--341},
  year      = {1949},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\autocite{metropolis49,creutz88}

\printbibliography
\end{document}

Creutz, Michael (1988). “Global Monte Carlo algorithms for many-fermion systems”. In: Physical Review D 38.4, pp. 1228–1238.//Metropolis, Nicholas and Stanislaw Ulam (1949). “The Monte Carlo method”. In: Journal of the American Statistical Association 44.247, pp. 335–341.

2
  • Thanks for your input. I hadn't considered that journal titles should be treated more as proper names, but I see that now. I like the biblatex-ext solution.
    – jwalton
    Jan 29, 2020 at 10:13
  • Also, props for spotting my mistake in not capitalising and protecting Monte Carlo in the titles.
    – jwalton
    Jan 29, 2020 at 10:14
5

For me your example produced Physical review D, if you get a lower case d, update your biber/biblatex versions. To preserve the whole name use {{Physical Review D}}

\documentclass{article}

\usepackage{filecontents}
\usepackage[backend=biber, style=authoryear, maxbibnames=10]{biblatex}

\DeclareFieldFormat{titlecase}{\MakeSentenceCase*{#1}}

\begin{filecontents}{\jobname.bib}
@Article{     creutz88,
  Title     = {Global Monte Carlo algorithms for many-fermion systems},
  Author    = {Creutz, Michael},
  Journal   = {{Physical Review D}},
  Volume    = {38},
  Number    = {4},
  Pages     = {1228--1238},
  Year      = {1988},
  Publisher = {APS}
}
@Article{     metropolis49,
  Title     = {The monte carlo method},
  Author    = {Metropolis, Nicholas and Ulam, Stanislaw},
  Journal   = {Journal of the {American} Statistical Association},
  Volume    = {44},
  Number    = {247},
  Pages     = {335--341},
  Year      = {1949},
  Publisher = {Taylor \& Francis}
}
\end{filecontents}

\addbibresource{\jobname}

\begin{document}

Stanislaw Ulam was one of the original pioneers of Monte Carlo methods
\parencite{metropolis49}.

With a problem of dimension $d$, the computational expense of a random-walk
sampler is $O(d^2)$, whereas the cost of Hamiltonian Monte Carlo is roughly
$O(d^5/4)$ \parencite{creutz88}.

\printbibliography

\end{document}

enter image description here

1
  • Thanks. I realise I can protect the entire entry with {{Physical Review D}}. I will try upgrading my biber version. I'm currently on V2.9.
    – jwalton
    Jan 28, 2020 at 12:20

You must log in to answer this question.

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