5

I am using a biblatex style that capitalizes authors' last names in the bibliography (ISO960, i.e. style=iso-authoryear). When an author's last name includes a ß, this gets capitalized to SS, but I would prefer for it to be capitalized to ẞ instead (which the font I'm using has). Here's a small example:

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8
%!TEX spellcheck = en_US
\documentclass{article}
\begin{filecontents}[force]{test.bib}
@Unpublished{Heussner2023,
  author = {{Heußner}, Ludwig},
  note   = {Lecture Notes},
  title  = {Angewandte Nationalökonomologie},
  month  = aug,
  year   = {2023},
  day    = {17},
}
\end{filecontents}
\usepackage[style=iso-authoryear]{biblatex}
\addbibresource{test.bib}
\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}}
\renewcommand*{\mkbibnameprefix}[1]{\textsc{#1}}
\usepackage{fontspec}
\setmainfont{XCharter}
\begin{document}
\textcite{Heussner2023} is a very interesting read.
\printbibliography
\end{document}

This produces

enter image description here

How can I tell biblatex that ß should become ẞ, not SS?

EDIT: https://tex.stackexchange.com/questions/171401/capital-ẞ-in-latex-xetex-lualatex-whatever does not answer this question.

chsk
  • 3,667
  • 1
    Egreg's answer works also in your case. Just add \usepackage{newunicodechar} \newunicodechar{ß}{\ss} \renewcommand{\SS}{\iffontchar\font"1E9E \symbol{"1E9E}\else SS\fi} to your preamble – DG' Sep 08 '23 at 11:16
  • 1
    Just out of idle curiosity: Why do you encase Heußner in the author field in curly braces? – Mico Sep 08 '23 at 11:17
  • @DG' the answer is quite outdated, support for uppercasing has changed a lot in the last years. – Ulrike Fischer Sep 08 '23 at 11:57
  • @DG' thanks for the link, and the code snippet; unfortunately, neither works. – chsk Sep 08 '23 at 12:10
  • @UlrikeFischer I know, but the MWE worked with that solution. Good thing you gave an more up-to-date answer! – DG' Sep 08 '23 at 20:58

1 Answers1

7

If you use babel and (n)german you can set the casing to eszett:

\documentclass{article}
\begin{filecontents}[force]{testss.bib}
@Unpublished{Heussner2023,
  author = {{Heußner}, Ludwig},
  note   = {Lecture Notes},
  title  = {Angewandte Nationalökonomologie},
  month  = aug,
  year   = {2023},
  day    = {17},
}
\end{filecontents}
\usepackage[ngerman]{babel}
\babelprovide[casing=eszett]{ngerman}
\usepackage[style=iso-authoryear]{biblatex}
\addbibresource{testss.bib}
\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}}
\renewcommand*{\mkbibnameprefix}[1]{\textsc{#1}}
\usepackage{fontspec}
\setmainfont{XCharter}
\begin{document}
\textcite{Heussner2023} is a very interesting read.

\printbibliography

\end{document}

(Without babel you can do something similar, but I assume that you want to set the language ...)

Without babel you can add a mapping directive:

\documentclass{article}
\DeclareUppercaseMapping{"00DF}{\char"1E9E}

\usepackage[style=iso-authoryear]{biblatex} \addbibresource{testss.bib} \renewcommand{\mkbibnamefamily}[1]{\textsc{#1}} \renewcommand{\mkbibnameprefix}[1]{\textsc{#1}} \usepackage{fontspec} \setmainfont{XCharter} \begin{document} \textcite{Heussner2023} is a very interesting read.

\printbibliography

\end{document}

enter image description here

Ulrike Fischer
  • 327,261