# Accent on í misaligned in bibliography / citation

I'm facing a strange issue with the accents on accented characters in bibliography entries not being placed right. Consider the following MWE, where a cited author's last name is ,,Galí:

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8
\begin{filecontents*}{biblatextest.bib}
@Book{Gali2015,
author    = {Gal{\'\i}, Jordi},
title     = {Monetary policy, inflation, and the business cycle: an introduction to the new Keynesian framework and its applications},
year      = {2015},
edition   = {2},
publisher = {Princeton University Press},
location  = {Princeton and Oxford},
}
\end{filecontents*}
\documentclass{article}
\usepackage[style=bath,sorting=ynt]{biblatex}
\begin{document}
\noindent Here is a citation. Compare \cite[S.~123]{Gali2015}.
The author's name is Gal{\'\i}.
\appendix
\newrefcontext[sorting=nyt]%
\printbibliography
\end{document}


Compare how the accent is placed in the citation and the bibliography vs. in regular text:

I'm at a complete loss as to how or why this is happening, or how to fix it. I'd appreciate any help, pointers, tips, suggestions etc. Thanks!

• Easiest is to avoid the bug by typing Galí directly in the bib file. – pst Aug 22 '19 at 11:45
• Regardless of the issue here since you are using the Unicode engine XeTeX and Unicode-aware Biber, you might as well migrate your .bib file to Unicode and avoid the awkward macro-ASCII-escapes (that may well have influence on kerning due to the - for TeX - superfluous brace group). – moewe Aug 23 '19 at 5:57

Biber translates \'\i into the Unicode sequence

U+0131 ı LATIN SMALL LETTER DOTLESS I
U+0301 ́ COMBINING ACUTE ACCENT

It seems like the Latin Modern fonts do not like this (valid) sequence.

XeLaTeX uses directly

U+00ED í LATIN SMALL LETTER I WITH ACUTE

which causes no problem with Latin Modern.

As workaround you can either use \'i or í in the .bib file. Both are treated as U+00ED by biber.

Actually the entire thing is independent of biber. If one uses these Unicode sequences directly in the tex file, one sees the same problems when Latin Modern is used. This is not the case for (some) other fonts:

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8
\documentclass{article}
\usepackage{fontspec}
\begin{document}
Gal{\'i}
Gal{\'\i}
Galı́ % U+0131 ı LATIN SMALL LETTER DOTLESS I  U+0301 ́ COMBINING ACUTE ACCENT
Galí % U+00ED í LATIN SMALL LETTER I WITH ACUTE

\setmainfont{Noto Serif}
Gal{\'i}
Gal{\'\i}
Galı́ % U+0131 ı LATIN SMALL LETTER DOTLESS I  U+0301 ́ COMBINING ACUTE ACCENT
Galí % U+00ED í LATIN SMALL LETTER I WITH ACUTE
\end{document}


Result:

• Just to know, you wrote ...are treated as U+00ED by biber. Where we could find such kind of information? – Sigur Aug 22 '19 at 12:34
• @Sigur I don't know if this is documented anywhere. I found it experimentally, i.e. processing various bib file with biber and inspecting the resulting hex-sequences (taking UTF-8 encoding into account). – Ralf Stubner Aug 22 '19 at 12:36
• So this is a bug in Latin Modern, really. Should this be reported? (And if so, where?) – chsk Aug 22 '19 at 13:17
• Biber converts the text in various ways to a standard format to do its sorting on, which is a good thing. But I think it's a problem that biber doesn't keep the original text around, as it is written in the bib file, and then uses that, but instead uses that canonical form. I have argued about this at github.com/plk/biber/issues/23 . – pst Aug 22 '19 at 14:51
• @pst Interesting. Using texencoding=ascii as mentioned in that thread solves the issue as well. But i am not sure about any side effects. – Ralf Stubner Aug 23 '19 at 8:02