Consider the following example:
\documentclass{standalone}
\usepackage{unicode-math}
\setmathfont{TeX Gyre Termes Math}
\begin{document}
\(f\Bigl(\Bigr)\)
\end{document}
If you compile it with xelatex
, you get
But if you compile it with lualatex
, you get a narrower
Definitely, the results differ, so at least one of the engines or unicode-math is wrong about the spacing between f and the left parenthesis. Subjectively, the output of xelatex
is more pleasant than that of lualatex
, so, I presume, lualatex
(or the code inside unicode-math run by lualatex only) is the culprit. But, I'm unaware of the "official" specification of how it should be, so, all bets are off.
How large is the distance between
f
and(
supposed to be for the most pleasant reading?Who is the culprit? (I.e., who deviates from the way it is supposed to be?)
Is there any way to repair the culprit or at least to achieve independency of the engine used for compilation more or less automatically?
Weakly related: Change bounding box of math glyphs in LuaTeX .
However, there, Ulrike said in her answer that "you are at the end of the math and luatex doesn't insert the italic correction at the boundary between math and text." Here, on the contrary, we are still inside math. If you insert \Uchar"200B
or 🦆
right after f
, you get more space for both engines, and the discrepancy remains. Moreover, it's far from automatic even if the discrepancy would have gone away.
EDIT: Concerning
This question already has an answer here: Change bounding box of math glyphs in LuaTeX
It doesn't. The answer from there doesn't fit here. Feel free to test it.
Crosspost: http://latex.org/forum/viewtopic.php?f=46&t=32655&p=109799
\(f\Uchar"200B\Bigl(\Bigr)\)
or\(f🦆\Bigl(\Bigr)\)
to have the spacing fixed. However I must say that it's a pain to do that eveywhere... I'll retract my close vote. – Phelype Oleinik Jul 5 '19 at 16:37\mathcal/\mathscr
Microsoft's Cambria Math font ended up with a different default than most others, which is a pain but probably not changeable given a decade of existing documents. "Clarifying" spacing rules would be similar even if you could isolate differences it doesn't mean that you can specify a single set of values without breaking existing code. – David Carlisle Jul 5 '19 at 18:35