[Tex/LaTex] Too much space after integral sign with unicode-math and lualatex

luatexmath-modespacingunicode-math

(I had a feeling this was a duplicate, but couldn't find an older question about it. Forgive me if I'm just bad at searching.)

Consider the minimal example

\documentclass{article}
\usepackage{mathtools}
\usepackage{unicode-math}
\setmathfont{lmmath-regular.otf}
\begin{document}
\begin{equation*}
  \int f(x) \, \mathrm{d}x
\end{equation*}
\end{document}

When compiled with lualatex the space between the integral sign and f(x) is too large, larger than what I get if I compile with xelatex (or if I'm not using unicode-math).

  • With lualatex:

enter image description here

  • With xelatex:

enter image description here

  • Without unicode-math:

enter image description here

I'm using a recently updated TeXlive 2011, and the same thing happens with Asana-Math.otf or xits-math.otf as math font. Can this be corrected somehow?

Best Answer

Update 28-10-2015: This has been fixed in version 0.85 of LuaTeX, see http://tracker.luatex.org/view.php?id=488


Looks something wrong with italic correction of integrals in the absence of super or subscripts, adding an empty superscript \int^{} f(x) fixes the spacing. Odd enough, adding empty subscript \int_{} f(x) makes it even closer! I'd report this to luatex bug tracker.