5

Using the first solution in this answer, we get a dot bellow the letter with \d{s} command, but how does this work in bibliography.bib file?

MWE:

\documentclass{scrbook}

\usepackage{fontspec}
    \setmainfont{Minion Pro} % No problem with Computer Modern typeface

\makeatletter
\renewcommand{\d}[1]
   {\hmode@bgroup
    \o@lign{\relax#1\crcr\hidewidth\ltx@sh@ft{-1ex}.\hidewidth}\egroup}
\makeatother

\usepackage[
    backend=biber,
]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author{\d{s}}, A.},
  year = {2001},
  title = {Alpha},
}
\end{filecontents}

\addbibresource{\jobname.bib}
\nocite{*}

\begin{document}

S with dot bellow: \d{s}
\printbibliography

\end{document}

Result of code above:

bibliography

omtamal
  • 347

1 Answers1

6

Biber is too clever for you trickeries here. Since \d is a common way in TeX to input diacritics, \d{s} is automatically converted to by Biber and written to the .bbl.

One easy way is to use a different name for the fake macro

\makeatletter
\newcommand{\dspec}[1]
   {\hmode@bgroup
    \o@lign{\relax#1\crcr\hidewidth\ltx@sh@ft{-1ex}.\hidewidth}\egroup}
\makeatother

and then use \dspec{s} instead of \d{s}.


Or you turn off Biber's conversion with --output-safechars

biber --output-safechars
moewe
  • 175,683