LaTeX forum ⇒ Math & Sciencelualatex: too little space inside f\Bigl(

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

lualatex: too little space inside f\Bigl(

Postby user49915 » Fri Jul 05, 2019 6:32 pm

Consider the following example:

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass{standalone}
  2. \usepackage{unicode-math}
  3. \setmathfont{TeX Gyre Termes Math}
  4. \begin{document}
  5. \(f\Bigl(\Bigr)\)
  6. \end{document}

If you compile it with xelatex, you get

compiled_with_xelatex.png (7.13 KiB) Viewed 597 times

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

compiled_with_lualatex.png (6.9 KiB) Viewed 597 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: ... -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: ... ide-f-bigl

Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 1 guest