0

I use biblatex with a biber backend and the \usepackage[utf8]{inputenc} package. For some reason, references in my .bib file that contain special characters are printed in all-caps in my bibliography.

I tried replicating the effect with a MWE, however every version I tried printed the bibliography in a correct way. Does anyone know of a combination of packages that could cause this behavior?

EDIT: MWE replicating the effect

\RequirePackage{filecontents}

\begin{filecontents*}{mybib.bib} @book{test1, address = {City}, title = {{Öffentlichkeit}}, publisher = {Doe, Jane}, author = {Doe, Jane}, year = {1937} }

\end{filecontents*}

\documentclass[ 12pt ]{book} % The class file specifying the document structure

% Set the values for the bibliography \usepackage[ style=apa, backend=biber, isbn=false, url=true, doi=true, natbib=true, eprint=false, hyperref=true, backref=false, firstinits=false ]{biblatex}

\usepackage[utf8]{inputenc} \usepackage[autostyle=true]{csquotes} % Required to generate language-dependent quotes in the bibliography \usepackage{xpatch}

% Set language \DeclareLanguageMapping{american}{american-apa}

\addbibresource{mybib.bib}

\addbibresource{mybib.bib}

\begin{document}

\textcite{test1}

\printbibliography \end{document}

  • Ok, placing the special characters inside extra curly brackets solves the problem, although I still do not understand what causes this behavior. – Pentaquark May 14 '21 at 13:20
  • 1
    It is very, very hard to say anything without seeing code that reproduces the undesirable output. If you have a document that does reproduce the undesirable output, it should be possible to turn (a copy of) it into a minimal example by removing as much code as possible while still retaining the undesirable output. Generally with biblatex there should not be a need to protect non-ASCII chars with curly braces, but with BibTeX (where you officially can't use non-ASCII chars) you have to surround the macros-escapes with braces (https://tex.stackexchange.com/q/57743/35864). – moewe May 14 '21 at 13:38
  • I added a MWE replicating the effect – Pentaquark May 14 '21 at 13:56
  • 1
    I see no problem with your example (with and without the braces) in a current texlive.. Show your log-file and the blg file. – Ulrike Fischer May 14 '21 at 15:38

1 Answers1

1

The issue does not occur when one runs the MWE as is with a current version of biblatex. The issue can, however, be reproduced if one switches to the legacy chase changing method with casechange=latex2e, (which was the - unchangeable - default in older versions [<=v3.14] of biblatex).

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[autostyle=true]{csquotes}
\usepackage[backend=biber, style=apa, casechanger=latex2e]{biblatex}

\begin{filecontents}{\jobname.bib} @book{test1, author = {Doe, Jane}, title = {{Öffentlichkeit}}, year = {1937}, publisher = {Pub &amp; Co.}, address = {City}, } \end{filecontents} \addbibresource{\jobname.bib} \begin{document} \textcite{test1}

\printbibliography \end{document}

Doe, J. (1937). ÖFFENTLICHKEIT. Pub & Co.

It is related to the problems with the case changer discussed in https://github.com/plk/biblatex/issues/459.

A workaround would be to brace only the first letter of the word and not the entire word

@book{test1,
  author    = {Doe, Jane},
  title     = {{Ö}ffentlichkeit},
  year      = {1937},
  publisher = {Pub \& Co.},
  address   = {City},
}

With German titles it would in general be preferable to mark the titles up as German to avoid any case changing completely

@book{test1,
  author    = {Doe, Jane},
  title     = {Öffentlichkeit},
  year      = {1937},
  publisher = {Pub \& Co.},
  address   = {City},
  langid    = {ngerman},
}

From version 3.15 (2020-08-16) onwards, biblatex uses expl3 case changing functions (if the LaTeX kernel is sufficiently modern and the document is encoded in UTF-8). Those case changing functions are in general more robust and do not have this issue. Update your TeX distribution if possible.

moewe
  • 175,683