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.
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}
Correct answer by moewe on August 7, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP