Following along with the great article of How to get BibLaTeX-chicago use title case capitalization? I modified the source map to:
<sourcemap>
<maps datatype="bibtex" map_overwrite="1">
<map>
<map_step map_field_source="TITLE"
map_match="(^|\s)(\w+\S*w*)" map_replace="$1\u\L$2"/>
<map_step map_field_source="TITLE"
map_match="\-(\w+)" map_replace="\-\u\L$1"/>
<map_step map_field_source="TITLE"
map_match="(\s+|\-)(A(|n|nd|s|t)|werden|zur|f\{\\"\{u\}\}r|die|B(ut|y)|F(or|rom)|I(n|s)|O(f|n|r)|T(he|o)|With)\b"
map_replace="$1\L$2"/>
<map_step map_field_source="TITLE"
map_match="([:;]\s+)([a-z])" map_replace="$1\u$2"/>
</map>
</maps>
</sourcemap>
in order to get a non English, i.e. German reference formatted correctly:
@misc{AdrianLobe2016,
author = {{A. Lobe}},
title = {{Social-Media-Daten werden zur Ampel f{\"{u}}r die Kreditw{\"{u}}rdigkeit}},
url = {http://mobil.derstandard.at/2000042297313/Social-Media-Daten-werden-zur-Ampel-fuer-die-Kreditwuerdigkeit},
urldate = {2016-08-05},
year = {2016}
}
As outlined by https://regex101.com/r/RwzhFT/1 the regex should match, but the connecting words are not lowercased and rendered as:
Social-Media-Daten Werden Zur Ampel Für Die Kreditwürdigkeit
Also, I want to apply the same preprocessing to the field JOURNAL
, however it is not picked up.
edit
here a full sample:
\documentclass{article}
\usepackage[backend=biber]{biblatex}
\usepackage{filecontents}
\begin{filecontents*}{biber.conf}
<?xml version="1.0" encoding="UTF-8"?>
<config>
<sourcemap>
<maps datatype="bibtex" map_overwrite="1">
<map>
<map_step map_field_source="TITLE"
map_match="(^|\s)(\w+\S*w*)" map_replace="$1\u\L$2"/>
<map_step map_field_source="TITLE"
map_match="\-(\w+)" map_replace="\-\u\L$1"/>
<map_step map_field_source="TITLE"
map_match="(\s+|\-)(A(|n|nd|s|t)|werden|zur|f\{\\"\{u\}\}r|die|B(ut|y)|F(or|rom)|I(n|s)|O(f|n|r)|T(he|o)|With)\b"
map_replace="$1\L$2"/>
<map_step map_field_source="TITLE"
map_match="([:;]\s+)([a-z])" map_replace="$1\u$2"/>
</map>
</maps>
</sourcemap>
</config>
\end{filecontents*}
\begin{filecontents*}{\jobname.bib}
@misc{AdrianLobe2016,
author = {{A. Lobe}},
title = {{Social-Media-Daten werden zur Ampel f{\"{u}}r die Kreditw{\"{u}}rdigkeit}},
url = {http://mobil.derstandard.at/2000042297313/Social-Media-Daten-werden-zur-Ampel-fuer-die-Kreditwuerdigkeit},
urldate = {2016-08-05},
year = {2016}
}
@BOOK{Smith2003,
title = {This is an off-the-hook book title, but it doesn't have a subtitle},
publisher = {Penguin},
year = {2003},
author = {Smith, James},
address = {London}}
@ARTICLE{Doe1970,
author = {H{\"a}user, {\O}rnulf},
title = {{\O}rnulf H{\"a}user's letter to the editor: an $\alpha$-to-$\omega$
summary of $\epsilon$--improvement},
journal = {Great Journal},
year = {1970},
volume = {40},
pages = {207-234}}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}