9

I'm trying to get every word in the title of each article in my reference list in capital letters (So Something Like This For Every Title). However, somehow \MakeSentenceCase remains active no matter what I do. This is how I am trying to get this done:

\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[backend=biber, style=authoryear]{biblatex}
\DeclareFieldFormat[article]{title}{\MakeCapital{#1}}

The manual also mentions \MakeUppercase, which I have also tried, and nothing changes either. When I use \textbf (just for testing purposes), then the titles do turn into boldface titles. So DeclareFieldFormat does work, just not MakeCapital.

8

\MakeCapital works only for the fist letter of the complete argument. As far as I understand biblatex there is no special macro for converting every first letter of a word into uppercase.

Here is an example how it may be possible. I used a book entry for this example (you can change it to whatever you need:

 \RequirePackage{filecontents}
\begin{filecontents*}{demo.bib}
@BOOK{Freeman:2003,
  title = {The measurement of environmental and resource values: Theory and
    methods},
  publisher = {Resources for the Future},
  year = {2003},
  author = {A. Myrick III Freeman},
  address = {Washington},
  owner = {Asus},
  timestamp = {2012.04.06}
}
\end{filecontents*}
\documentclass{article}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[backend=biber, style=authoryear]{biblatex}
\addbibresource{demo.bib}

\makeatletter
\def\FirstLetterUppercase#1{\expandafter\FirstLetterUppercase@i#1 \@nil}
\def\FirstLetterUppercase@i#1#2 #3\@nil{%
  \MakeUppercase{#1}#2
  \ifx\relax#3\relax\def\next@i{}\else\def\next@i{\expandafter\FirstLetterUppercase@i#3\@nil}\fi%
  \next@i}
\makeatother
\renewbibmacro*{title}{\printtext{\printfield{title}}\newunit}
\DeclareFieldFormat*[book]{title}{\protect\FirstLetterUppercase{#1}}
\begin{document}

\FirstLetterUppercase{now i will see what happens.}

\nocite{*}
\printbibliography

\end{document}

enter image description here

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.