1

Consider the following example:

\usepackage{unicode-math}
\setmathfont{Asana-Math.otf}
% \setmathfont{KpMath-Regular.otf}

\begin{document}

( \left. g \right| ) ( \left. h \right| )

( \scriptstyle \left. g \right| ) ( \scriptstyle \left. h \right| )

\end{document}

enter image description here

As you can see, the automatic vertical bar is too long for the letter g for this font (this also happens for f, j, p, q and y). Taking KpMath as comparison:

enter image description here

Is there some way to fix this behavior? (Since I'm using LuaLaTeX, it would be nice to have a Lua solution if general solution is not available.)

Jinwen
  • 8,518

1 Answers1

1

Instead of automatic sizing with \left. and \right, you can use \rvert, perhaps with manual sizing such as \big\rvert or \bigg\rvert.

You might also have better luck in some cases with TeX Gyre Pagella Math, which like Asana Math is based on Palatino.

Davislor
  • 44,045
  • Actually the automatic sizing is part of the restriction command here in this answer. Also it is actually due to an unsolved question regarding the spacing around letter f with the font TeX Gyre Pagella Math that had me switched to Asana Math: see my previous question. – Jinwen Sep 28 '22 at 04:10
  • @Jinwen You could use something like s paired math delimiter from mathtools, where \restriction{g} is normal-size, but \restriction*{g} auto-sizes and \restriction[\big]{g} specifies an exact size. – Davislor Sep 28 '22 at 04:28