2

I try to hunt down a strange problem with German quotes and the babel shortcuts. I already asked another question (German quotes with biblatex/biber), but this is the real MWE that matters. There seems to be some weird interaction between biblatex's dealing with language settings and "` at the first position of the title field. In my book, I have a situation where the German shorthands do not work in the title field if it starts with "`. I first noticed the problem because it capitalized the whole title. I can reproduce this now in the following example:

\documentclass{article}

\usepackage[ngerman,main=english]{babel}
\useshorthands*{"}
\addto\extrasenglish{\languageshorthands{ngerman}}

\begin{filecontents}{ref.bib}

@article{Wegener85a,
        Author = {Heide Wegener},
        Journal = {Linguistische Berichte},
        Pages = {127--139},
        Title = {"`Er bekommt widersprochen"' -- Argumente Test/""Test für die Existenz eines Dativpassivs im Deutschen},
        Volume = {96},
        langid = {ngerman},
        Year = {1985}}

@article{Wegener86,
        Author = {Heide Wegener},
        Journal = {Linguistische Berichte},
        Pages = {127--139},
        Title = {\glqq Er bekommt widersprochen"' -- Argumente Test/""Test für die Existenz eines Dativpassivs im Deutschen},
        Volume = {96},
        langid = {ngerman},
        Year = {1986}}



@article{Wegener87,
        Author = {Heide Wegener},
        Journal = {Linguistische Berichte},
        Pages = {127--139},
        Title = {{"`Er bekommt widersprochen"' -- Argumente Test/""Test für die Existenz eines Dativpassivs im Deutschen}},
        Volume = {96},
        Year = {1987}}

@article{Wegener88,
        Author = {Heide Wegener},
        Journal = {Linguistische Berichte},
        Pages = {127--139},
        Title = {{Test "`Er bekommt widersprochen"' -- Argumente Test/""Test für die Existenz eines Dativpassivs im Deutschen}},
        Volume = {96},
        Year = {1988}}
\end{filecontents}

\usepackage{bibentry}

\usepackage[
style=langsci-unified,
 %    autolang=langname,
        backend=biber,
]{biblatex}
\addbibresource{ref.bib}

\begin{document}
Test"=Sequenz "`Ergative"' Verben

\nocite{*}
\printbibliography
\end{document}

If the language id is not set and the quote character is in the first position of the title field, the text is capitalized. If I add stuff in the beginning everything is back to normal.

enter image description here

1 Answer 1

6

You are running into the peculiarities of biblatex's implementation of sentence casing (\MakeSentenceCase) and its brace protection against case changes. biblatex emulates (on the LaTeX side) the case changing that BibTeX applies with change.case$. biblatex's version largely copies BibTeX's behaviour, but due to its implementation, there are some differences (the most important of which are documented in the biblatex manual, pp. 253-255 in v3.14, cf. https://github.com/plk/biblatex/issues/871).

Let's have a look at the following, slightly more systematic example

\documentclass{article}

\usepackage[ngerman,main=english]{babel}
\useshorthands*{"}
\addto\extrasenglish{\languageshorthands{ngerman}}

\begin{filecontents}{\jobname.bib}
@article{Wegener85,
  Author  = {Heide Wegener},
  Journal = {Linguistische Berichte},
  Pages   = {127--139},
  Title   = {"`Er bekommt widersprochen"'
             -- Argumente Test/""Test
             für die Existenz eines Dativpassivs im Deutschen},
  Volume  = {96},
  Year    = {1985},
}
@article{Wegener86,
  Author  = {Heide Wegener},
  Journal = {Linguistische Berichte},
  Pages   = {127--139},
  Title   = {{"`Er bekommt widersprochen"'
             -- Argumente Test/""Test
             für die Existenz eines Dativpassivs im Deutschen}},
  Volume  = {96},
  Year    = {1986},
}
@article{Wegener87,
  Author  = {Heide Wegener},
  Journal = {Linguistische Berichte},
  Pages   = {127--139},
  Title   = {{{"`Er bekommt widersprochen"'
             -- Argumente Test/""Test
             für die Existenz eines Dativpassivs im Deutschen}}},
  Volume  = {96},
  Year    = {1987},
}

@article{Wegener95,
  Author  = {Heide Wegener},
  Journal = {Linguistische Berichte},
  Pages   = {127--139},
  Title   = {\glqq Er bekommt widersprochen"'
             -- Argumente Test/""Test
             für die Existenz eines Dativpassivs im Deutschen},
  Volume  = {96},
  Year    = {1995},
}
@article{Wegener96,
  Author  = {Heide Wegener},
  Journal = {Linguistische Berichte},
  Pages   = {127--139},
  Title   = {{\glqq Er bekommt widersprochen"'
             -- Argumente Test/""Test
             für die Existenz eines Dativpassivs im Deutschen}},
  Volume  = {96},
  Year    = {1996},
}
@article{Wegener97,
  Author  = {Heide Wegener},
  Journal = {Linguistische Berichte},
  Pages   = {127--139},
  Title   = {{{\glqq Er bekommt widersprochen"'
             -- Argumente Test/""Test
             für die Existenz eines Dativpassivs im Deutschen}}},
  Volume  = {96},
  Year    = {1997},
}

@article{Wegener05,
  Author  = {Heide Wegener},
  Journal = {Linguistische Berichte},
  Pages   = {127--139},
  Title   = {Test "`Er bekommt widersprochen"'
             -- Argumente Test/""Test
             für die Existenz eines Dativpassivs im Deutschen},
  Volume  = {96},
  Year    = {2005},
}
@article{Wegener06,
  Author  = {Heide Wegener},
  Journal = {Linguistische Berichte},
  Pages   = {127--139},
  Title   = {{Test "`Er bekommt widersprochen"'
             -- Argumente Test/""Test
             für die Existenz eines Dativpassivs im Deutschen}},
  Volume  = {96},
  Year    = {2006},
}
@article{Wegener07,
  Author  = {Heide Wegener},
  Journal = {Linguistische Berichte},
  Pages   = {127--139},
  Title   = {{{Test "`Er bekommt widersprochen"'
             -- Argumente Test/""Test
             für die Existenz eines Dativpassivs im Deutschen}}},
  Volume  = {96},
  Year    = {2007},
}
\end{filecontents}

\usepackage[
style=langsci-unified,
 %    autolang=langname,
        backend=biber,
]{biblatex}
\addbibresource{\jobname.bib}

\begin{document}
Test"=Sequenz "`Ergative"' Verben

\nocite{*}
\printbibliography
\end{document}

Wegener, Heide. 1985. „er bekommt widersprochen“ – argumente test/test für die existenz eines dativpassivs im deutschen. Linguistische Berichte 96. 127–139.//Wegener, Heide. 1986. „ER BEKOMMT WIDERSPROCHEN“ – ARGUMENTE TEST/TEST FÜR DIE EXISTENZ EINES DATIVPASSIVS IM DEUTSCHEN. Linguistische Berichte 96. 127–139.//Wegener, Heide. 1987. „Er bekommt widersprochen“ – Argumente Test/Test für die Existenz eines Dativpassivs im Deutschen. Linguistische Berichte 96. 127–139.

Before we start discussing the results, note that it is in general not a good idea to just protect the whole title field with a single pair of curly braces in a WYSIWYG approach

title = {{Title That Remains Unchanged}},

In English (and other languages that use sentence casing) you should only protect those words that need case protection. In case your title is in a foreign language that doesn't want sentence casing, you should tell biblatex about it with langid. (With langid = {ngerman}, or langid = {german}, there is no case change in the entry.)

That said, we'd face the same underlying issue if we had to protect the first word of the title.

With that out of the way, notice first that " and \glqq behave analogously. This is intentional. If " is active (usually because it is a babel shorthand) it will trigger the same behaviour as a control sequence in \MakeSentenceCase. I guess that is mainly in order to be able to treat "A and \"A (for Ä) the same. (The method used by biblatex to ensure that an active " is treated like a macro has the potential to break if " is used as a 'normal character' and not in its shorthand capacity.)

The main issue here is that biblatex and BibTeX's sentence casing function treats a brace group (at brace level 0) starting with a control sequence as a single character. That is to say {\"A} and {\relax Foo} are treated as a single character even though they consist of more stuff. That function allows BibTeX to correctly build first name initials with accented characters. It is also the basis of the 'multi-letter initials' trick (see BibTeX: Abbreviate first name (aka given name) to 2 or 3 letters (not 1)).

This 'a brace group starting with a control sequence is a single character' behaviour only becomes a problem in biblatex if the brace group is at the beginning of the string. Unlike BibTeX's case changer, biblatex's case changer explicitly capitalises the first character of the string. If the string starts with a brace group starting with a control sequence, then this whole group is capitalised as one character. So {\"a} becomes {\"A} (good) and {\relax Foo} becomes {\relax FOO} (hmmm...).

In

  Title   = {{\glqq Er bekommt widersprochen"'
             -- Argumente Test/""Test
             für die Existenz eines Dativpassivs im Deutschen}},

the entire title is treated as a single character. Since it is the first character in the string, it is capitalised in its entirety. So we get all-caps.

This is what the biblatex documentation tries to explain with

The first letter of its argument is capitalised with \MakeUppercase. This is different from BibTeX's change.case$, which does not touch the first letter of its argument. Note that a pair of braces that starts with a control sequence will be treated as one character for capitalisation purposes. This means that the entire argument of a command protected with a single pair of braces is capitalised.

In your case there is an easy way out of this dilemma: Use double braces if you would otherwise end up with a single brace group starting with a control sequence.

  Title   = {{{\glqq Er bekommt widersprochen"'
             -- Argumente Test/""Test
             für die Existenz eines Dativpassivs im Deutschen}}},

It is tempting to make using double curly braces for case protection a general rule, but I'd try to resist that temptation.


Note that the next version of biblatex will feature a new case changing function based on expl3 code that does not exhibit this behaviour any more and is overall more robust. See https://github.com/plk/biblatex/issues/960 and https://github.com/plk/biblatex/pull/1005 for background and more details. In particular it will be possible to use a different case protection mechanism that does not rely on curly braces, whose meaning is overloaded too much in BibTeX, alone.

6
  • Thanks a lot!!! As for using brackets on the whole title: What about collections of works in a book with an English title but German chapter titles. I always wondered how to set the langid for those cases. And there are backward compatibility issues with bibtex. You never know what a publisher may use. Jun 5, 2020 at 20:11
  • This was wrong in the 2018 and 2019 edition of my Grammatical Theory textbook (entry Fanselow 1992) and I am very glad that I finaly found and understood this issue. Thanks! Jun 5, 2020 at 20:24
  • @StefanMüller If you have a two-language entry with fields in different languages then some more work and trickery is needed. (Multi-language/script entries aren't fully supported yet anyway, see github.com/plk/biblatex/issues/416 for some progress on that side). If you need to retain backwards compatibility with BibTeX, then your hands are obviously tied.
    – moewe
    Jun 6, 2020 at 5:18
  • is there a way to force biblatex to not try to capitalize the first letter, eg for "iPad" or "isiZulu" or "s'Gravenhage"?
    – Sebastian
    Jun 6, 2020 at 13:59
  • Brace-case protection should work here as well. title = {{iPhone} Manual}, should do it.
    – moewe
    Jun 6, 2020 at 14:03

You must log in to answer this question.

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