10

To compare the \nolimits algorithms for operators for XeTeX and LuaTeX, I tested:

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{xits-math.otf}

\begin{document}
   \[ \int_0^\infty \]
\end{document}'

I got the following results for XeTeX (0.99996) and LuaTeX (0.95), respectively.

XeTeX LuaTeX

I understand the algorithm that LuaTeX used to obtain the results shown: after determining the heights of the superscript and subscript, the horizontal kerning is taken to be ic/2 for the superscript and -ic/2 for the subscript, where ic is the italics correction for the integral operator. What I don't understand is what XeTeX used.

What algorithm is XeTeX using? As far as I know the only font parameters provided to XeTeX from XITS is the italics correction information for the integral sign.

Edit: As of LuaTeX 0.99, no longer is the superscript kerned right by ic/2 and the subscript kerned left by ic/2 by default. Now the default is to not kern the superscript, and to kern the subscript left by 3/4 ic. This parameter can be modified by \mathnolimitsmode. See the section Nolimit correction in the LuaTeX reference for more information.

4
  • 1
    FWIW, placement of integral bounds in LuaTeX seems still broken.
    – egreg
    Dec 20 '16 at 9:00
  • @egreg in miktex (with luatex 1.0 and the prerelease luaotfload) it looks ok. Dec 20 '16 at 10:34
  • @UlrikeFischer Happy to know!!
    – egreg
    Dec 20 '16 at 10:35
  • @UlrikeFischer Thanks. It appears that LuaTeX changed their default configuration and introduce a new nolimits mode. To quote LuaTeX's source: int mode = nolimits_mode_par; /* wins */. ;)
    – breeden
    Dec 20 '16 at 14:02
3

With STIX Math Two instead of XITS Math

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{STIX Two Math}

\begin{document}
   \[ \int_0^\infty \]
\end{document}

I get the following outputs.

XeTeX 3.14159265-2.6-0.99996 (TeX Live 2016)

enter image description here

LuaTeX, Version 0.95.0 (TeX Live 2016)

enter image description here

XeTeX 3.14159265-2.6-0.99998 (TeX Live 2017)

enter image description here

LuaTeX, Version 1.0.4 (TeX Live 2017)

enter image description here

Summary

It seems that LuaTeX 1.0.4 has fixed the bug with integrals. And STIX Two Math fixes other aspects of XITS Math.

Note: TeX Live 2017 is due tomorrow (2017-06-04) at time of writing this answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.