## LaTeX forum ⇒ Math & Science ⇒ lualatex: too little space inside f\Bigl(

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
user49915
Posts: 62
Joined: Wed Apr 17, 2019 12:51 pm

### lualatex: too little space inside f\Bigl(

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

compiled_with_xelatex.png (7.13 KiB) Viewed 596 times

But if you compile it with lualatex, you get a narrower

compiled_with_lualatex.png (6.9 KiB) Viewed 596 times

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?

- Who is the culprit? (I.e., who deviates from the specification?)

- Is there any way to repair the culprit or at least to achieve independence of the engine used for compilation?

Weakly related: http://tex.stackexchange.com/questions/ ... -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 the duck symbol U+01F986 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.

Crosspost: http://tex.stackexchange.com/questions/ ... ide-f-bigl