[luatex] Wrong placement using \displaylimits and unicode-math

Jakub Kaczor jakub at jakubkaczor.com
Wed Dec 8 21:33:42 CET 2021


Hello there,
there were some reports regarding the placement of the limits in integrals
a few years ago
<https://tug.org/pipermail/luatex/2015-March/005076.html>. It was with
regard to display math and `\limits`. They seem to work fine for me, but I
spotted some weird behavior using `\displaylimits` *in in-line math*. In my
opinion, the limits of integration are placed way too much on the
right. The expected behavior is to have the same placement as with
`\nolimits` in in-line math, and as with `\limits` in display math. The
problem doesn't occur with XeLaTeX and it seems to be independent of a
font. Here is a minimal working example comparing different options:

``` latex
%! TeX program = lualatex
\documentclass{article}

\usepackage{unicode-math}

\begin{document}
\(\int\limits_a^b f(x)\,\mathrm dx\)
\(\int\nolimits_a^b f(x)\,\mathrm dx\)
\(\int\displaylimits_a^b f(x)\,\mathrm dx\)
\[\int\limits_a^b f(x)\,\mathrm dx\]
\[\int\nolimits_a^b f(x)\,\mathrm dx\]
\[\int\displaylimits_a^b f(x)\,\mathrm dx\]
\end{document}
````

Here, the third line after `\begin{document}` is the faulty one.

Best regards
Jakub Kaczor


More information about the luatex mailing list.