# lualatex: Why is \textbar̈ working, but not \textbar̙?

Why is line b) working, but not line d), if compiled the with lualatex?

In Line b) the r (U+0072) is followed by ̈ (U+0308). This compiles without errors.

In Line d) the r (U+0072) is followed by ̙ (U+0319). This produces (if % removed) the error “\textbar̙ … Undefined control sequence. …”

\documentclass{article}
\usepackage{fontspec}
\usepackage{dejavu-otf}
\begin{document}
a) r̙ r̈ \$̈ \$̙
b) \textbar̈
c) \textbar{}̙
d) % \textbar̙
\end{document}

This is LuaHBTeX, Version 1.12.0 (TeX Live 2020/Debian)

• The exact error is that \textbar̙ is undefined. The U+0319 has the catcode of a letter, and so continues the command name, you get an error for the same reason why you would get an error from \textbarx: the command name simply isn't defined. Apr 9, 2021 at 8:14
• @UlrikeFischer yes that's clear but what happened with the first one that is using r followed by U+0308 which is also catcode 11 but \show\textbar̈ shows \textbar with the diacritic following, as if it were catcode 12 ? Apr 9, 2021 at 8:57
• oh it is catcode 12, that seems... wrong? Apr 9, 2021 at 9:00

This seems to be an issue with the dejavu-otf package unicode-math it is making the combining diaeresis catcode12 (punctuation) so it can not be part of a command name


\showthe\catcode"0308
\documentclass{article}
\usepackage{fontspec}
\showthe\catcode"0308
%\usepackage{dejavu-otf}
\showthe\catcode"0308
\begin{document}
\showthe\catcode"0308

a) r̙ r̈ \$̈ \$̙
b) \show\textbar̈
c) \textbar{}̙
d)  \show\textbar̙
\end{document}


adding \catcode"0308=11 would restore the usual behaviour.

This seems to be a feature of unicode-math (I'll raise it there)

\documentclass{article}

\RequirePackage{unicode-math}
\showthe\catcode"0308
\setmathfont{TeXGyreDejaVuMath-Regular}
\showthe\catcode"0308
\begin{document}

\end{document}



just setting the math font changes the catcode of a text diacritic which seems... unexpected