TransWikia.com

Biblatex / Biber with babel ngerman - sentence case not working

TeX - LaTeX Asked on August 7, 2021

When I use biblatex with usepackage[ngerman]{babel} sentence casing in the references stop working. When I deactivate usepackage[ngerman]{babel} it works well. See the following MWE:

documentclass{book}
usepackage[ngerman]{babel}

usepackage[backend=biber,natbib=true,style=apa,isbn=false,doi=false,eprint=false,uniquename=false]{biblatex}

begin{filecontents}{test.bib}
    @article{Bandura.1999,
        author = {Bandura, Albert},
        year = {1999},
        title = {Moral Disengagement in the Perpetration of Inhumanities},
        pages = {193--209},
        volume = {3},
        number = {3},
        issn = {1088-8683},
        journal = {Personality and Social Psychology Review},
        doi = {10.1207/s15327957pspr0303{textunderscore }3}
    }
end{filecontents}

addbibresource{test.bib}

begin{document}
    citep{Bandura.1999}
    printbibliography
end{document}

How can I combine both (sentence casing for english sources and using ngerman), since the thesis is written in German, but has a lot of English sources.

One Answer

If you do not explicitly give the language of the entry in the .bib file via the langid field, biblatex will automatically use the rules of the surrounding language. In your case that means that biblatex will not apply sentence casing since sentence casing is not enabled for German (as ordered with ngerman) by default (and it would not make sense to enable it).

The solution is to add langid = {english}, to English works. On the other hand you will also want to add langid = {ngerman}, to the German works you cite in case you want to use them in an English document to avoid sentence casing.

documentclass{article}
usepackage[ngerman]{babel}

usepackage[backend=biber, style=apa]{biblatex}

begin{filecontents}{jobname.bib}
@article{Bandura.1999,
  author  = {Bandura, Albert},
  year    = {1999},
  title   = {Moral Disengagement in the Perpetration of Inhumanities},
  pages   = {193--209},
  volume  = {3},
  number  = {3},
  issn    = {1088-8683},
  journal = {Personality and Social Psychology Review},
  doi     = {10.1207/s15327957pspr0303_3},
  langid  = {english},
}
end{filecontents}
addbibresource{jobname.bib}

begin{document}
  autocite{Bandura.1999}
  printbibliography
end{document}

Bandura, A. (1999). Moral disengagement in the perpetration of inhumanities. Personality and Social Psychology Review, 3(3), 193–209. https://doi.org/10.1207/s15327957pspr0303_3

Correct answer by moewe on August 7, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP