# Problem with the placement of limits of integration in stix2

There seems to be a problem in placement of limits in the stix2 package. The limits are placed too far from the integral sign. Here is a MWE.

\documentclass{article}
\usepackage{stix2}
\begin{document}
Consider the integral
$\int_0^1 f(x)\,dx.$
\end{document}


The output is given below:

Is there any simple work around for this? By the way, problems with stix package I had mentioned in Problem with stix fonts in texlive 2018 have been fixed in a an update. stix doesn't have this problem with placement of limits. However, since stix2 is newer and likely to maintained, I would like to stick to the newer version. Is there any simple work around for the problem?

It looks like a bug in the font metrics, you should report to the font maintainers.

It is hard to make a general workaround as a macro that detects display or inline math, and \limits or \nolimits cases, and that will not do the wrong thing as soon as the font is fixed.

For a particular case, best I can suggest is adding negative space as in the last example below.

\documentclass{article}
\usepackage{stix2}
\begin{document}
Consider the integral

\makeatletter

$\int_0^1 f(x)\,dx. \intop_0^1 f(x)\,dx. \intop\nolimits_0^1 f(x)\,dx.$

$\int_0^1 f(x)\,dx. \intop_0^1 f(x)\,dx. \intop\nolimits_0^1 f(x)\,dx.$

$\int_0^1 f(x)\,dx. \intop_0^1 f(x)\,dx. \intop\nolimits_0^1 f(x)\,dx.$

$\int_0^1 f(x)\,dx. \intop_0^1 f(x)\,dx. \intop\nolimits_0^1 f(x)\,dx.$

\bigskip

$\int_{\mkern-6mu 0}^{\mkern-6mu 1} f(x)\,dx.$

\end{document}