1

I would like to capitalize not only article and journal titles as in here and in the MWE below that simply reproduces the latter, but also book titles when using biblatex.

My MWE for the main text is (main.tex):

\documentclass{scrbook}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

% Bibliography
\usepackage[backend=biber, style=chicago-authordate, hyperref=auto, bibencoding=inputenc, refsection=chapter, doi=false, url=false, isbn=false, eprint=false]{biblatex}
\usepackage[babel,autostyle=true]{csquotes}

% Capitalize article titles and journal names
\usepackage{mfirstuc} 
\MFUnocap{a}
\MFUnocap{for}
\MFUnocap{the}
\MFUnocap{of}
\MFUnocap{and}
\MFUnocap{con}
\MFUnocap{il}
\DeclareFieldFormat{jtnoformat}{\capitalisewords{#1}}

\usepackage{xpatch}
\xpatchbibmacro{mag+news+title}{\printfield[noformat]{title}}{\printfield[jtnoformat]{title}}{}{}

\addbibresource{sample.bib}

\begin{document}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla posuere. Donec vitae dolor. Nullam tristique diam non turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam vestibulum accumsan nisl \parencite{Poggi2008,Polachek1985}.

\printbibliography

\end{document}

And my MWE for the bib file (sample.bib) is:

@Book{Poggi2008,
  author =       "Gianfranco Poggi and Giuseppe Sciortino",
  title =        "Incontri con il pensiero sociologico",
  year =         2008,
  publisher =    "Il Mulino",
  address =      "Bologna"}

@article{Polachek1985,
    author = "Polachek, Solomon William",
    journal = "The journal of human resources",
    month = "Summer",
    number = 3,
    pages = "437--440",
    title = "Occupational segregation: A defense of human capital predictions",
    volume = 20,
    year = 1985}

By compiling you'll see that the article and journal for the Polacheck entry is capitalized beautifully, but the entry for the book by Poggi is not.

Daniel
  • 77
  • 5

1 Answers1

1
\documentclass{scrbook}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

% Bibliography
\usepackage[backend=biber, style=chicago-authordate, hyperref=auto, bibencoding=inputenc, refsection=chapter, doi=false, url=false, isbn=false, eprint=false]{biblatex}
\usepackage[babel,autostyle=true]{csquotes}

% Capitalize article titles and journal names
\usepackage{mfirstuc} 
\MFUnocap{a}
\MFUnocap{for}
\MFUnocap{the}
\MFUnocap{of}
\MFUnocap{and}
\MFUnocap{con}
\MFUnocap{il}
\DeclareFieldFormat{jtnoformat}{\capitalisewords{#1}}

\usepackage{xpatch}
\xpatchbibmacro{mag+news+title}{\printfield[noformat]{title}}{\printfield[jtnoformat]{title}}{}{}

\xpatchbibmacro{italtitle+stitle}{\printfield[tnoformat]{title}}{\printfield[jtnoformat]{title}}{}{}

\begin{filecontents*}[overwrite]{sample.bib}
@Book{Poggi2008,
  author =       "Gianfranco Poggi and Giuseppe Sciortino",
  title =        "Incontri con il pensiero sociologico",
  year =         2008,
  publisher =    "Il Mulino",
  address =      "Bologna"}

@article{Polachek1985,
    author = "Polachek, Solomon William",
    journal = "The journal of human resources",
    month = "Summer",
    number = 3,
    pages = "437--440",
    title = "Occupational segregation: A defense of human capital predictions",
    volume = 20,
    year = 1985}
\end{filecontents*}

\addbibresource{sample.bib}

\begin{document}

\nocite{Poggi2008,Polachek1985}.

\printbibliography

\end{document}

enter image description here

  • Wow, thank you very much for your time @samcarter ! These macros are very cryptic (in the words of the [xpatch manual](https://ctan.org/pkg/xpatch/)) but they do work and rock! – Daniel Jan 29 '23 at 15:48
  • @Daniel Indeed, the Chicago style uses very cryptic macro names. In normal biblatex styles one can almost always make an educated guess, but with this style one need to dig through all the nested input styles. Other styles are much more fun to patch :) – samcarter_is_at_topanswers.xyz Jan 29 '23 at 16:19
  • Hello @samcarter, I've noticed that the answer does not cater for subtitles as in this example (i.e., the subtitle won't be capitalized): ```` @Book{Elias1987b, author = "Norbert Elias", title = "The civilizing process", year = "2000 [1939]", subtitle = "Sociogenetic and psychogenetic investigations", edition = "Revised", publisher = "Blackwell", location = "Oxford"} ```` How can we make your solution work for this case as well? Thank you so much for your attention and assistance! – Daniel Feb 28 '23 at 16:58
  • @Daniel Can you please ask this as a new question? (comments aren't great to show code, as you can see linebreaks etc all get lost) – samcarter_is_at_topanswers.xyz Feb 28 '23 at 17:04
  • Thank you @samcarter! You can find the new question [here](https://stackoverflow.com/questions/75595692/capitalize-book-titles-and-subtitles-in-biblatex-bibliography) – Daniel Feb 28 '23 at 17:58