3

When the integral sign has a below limit (or more precisely a path, here), the integrand is closer to the integral sign than when the integral hasn't a below limit (or a path).

This strange behavior happens with libertinust1math, but (as expected) not with Computer Modern.

Update: a temporary workaround is provided at the bottom.

Note: according to the standard ISO 80000-2, the differential sign must be an upright d, but here, for simplicity, and because this is note the core problem, I use an italic d.

With libertinust1math

\documentclass{article}
\usepackage{xcolor}
\usepackage{libertinust1math}

\begin{document}
$\color{red}\displaystyle\int f(t)dt$

$\color{green}\displaystyle\int_{\gamma} f(t)dt$

Superposed:

\makebox[0pt][l]{\color{red}$\displaystyle\int f(t)dt$}\color{green}$\displaystyle\int_{\gamma} f(t)dt$
\end{document}

enter image description here

Here the \gamma takes more space, but when it is present, the f(t)dt is closer to the left.

With Computer Modern

The behavior is here as expected. The \gamma takes a little horizontal space, so the f(t)dt is slightly more in the right side.

\documentclass{article}
\usepackage{xcolor}
%\usepackage{libertinust1math}

\begin{document}
$\color{red}\displaystyle\int f(t)dt$

$\color{green}\displaystyle\int_{\gamma} f(t)dt$

Superposed:

\makebox[0pt][l]{\color{red}$\displaystyle\int f(t)dt$}\color{green}$\displaystyle\int_{\gamma} f(t)dt$
\end{document}

enter image description here

Question

How to have less space between the integral sign and the integrand? I can manually add \! before f(t)dt but if this is not a bug in the font, perhaps I am missing something. And \! is perhaps not the good negative space to add in all situations.

If I add \!, as in the next code:

\documentclass{article}
\usepackage{xcolor}
\usepackage{libertinust1math}

\begin{document}
$\color{red}\displaystyle\int \!f(t)dt$

$\color{green}\displaystyle\int_{\gamma} f(t)dt$

Superposed:

\makebox[0pt][l]{\color{red}$\displaystyle\int \!f(t)dt$}\color{green}$\displaystyle\int_{\gamma} f(t)dt$
\end{document}

I obtain this:

enter image description here

Workaround

The author of the package has suggested to enclose the integral sign with braces, so the integral is treated as \mathbin instead of \mathop. Perhaps an update of the package can be provided, but he is not sure yet.

The workaround works great in this case:

\documentclass{article}
\usepackage{xcolor}
\usepackage{libertinust1math}

\begin{document}
$\color{blue}\displaystyle{\int} f(t)dt$

$\color{red}\displaystyle\int f(t)dt$

$\color{green}\displaystyle\int_{\gamma} f(t)dt$

Superposed:

\makebox[0pt][l]{\color{blue}$\displaystyle{\int} f(t)dt$}\color{green}$\displaystyle\int_{\gamma} f(t)dt$
\end{document}

This gives (blue is with the workaround, red without, and green is a reference; in the superposition, the red is not displayed):

enter image description here

1
  • 3
    "Note: according to the standard ISO 80000-2," That is only of course if you are using the kind of non mathematical document to which that applies. the title of the original version, ISO 31-11:1992, made more sense " Quantities and units — Part 11: Mathematical signs and symbols for use in the physical sciences and technology" That is, it is specifying use of mathematics notation as used in fields other than mathematics. Commented May 22 at 14:46

1 Answer 1

5

It is more dramatic with an empty subscript

enter image description here

\documentclass{article}
\usepackage{xcolor}
\usepackage{libertinust1math}
\showoutput
\begin{document}
$\color{red}\displaystyle\int f(t)dt$

$\color{red}\displaystyle\int_{} f(t)dt$

$\color{green}\displaystyle\int_{\gamma} f(t)dt$


\end{document}

The character has quite an agressive italic correction to pull in a subscript, and this affects the positioning of the following items. If the subscript is not as wide as the amount it is shifted left, then the following text will be closer to the integral sign.

If you add \showoutput the first one shows

....\hbox(16.595+4.87999)x11.94998, shifted 3.25752
.....\LS2/libertinust1mathex/m/n/10 �
....\glue(\thinmuskip) 1.66663
....\LS1/libertinust1math/m/it/10 f

so the integral is 11.95pt wide then 1.67pt thinmuskip then the f

But the second one is

....\hbox(16.595+4.87999)x5.57999, shifted 3.25752
.....\LS2/libertinust1mathex/m/n/10 �
....\hbox(0.0+0.0)x0.5, shifted 8.4875
....\glue(\thinmuskip) 1.66663
....\LS1/libertinust1math/m/it/10 f

So the same thinmuskip before the f but the integral is in a constructed box that is just 5.58pt wide although an additional .5pt space is added for the empty subscript box.

The third one is

....\hbox(16.595+4.87999)x5.57999, shifted 3.25752
.....\LS2/libertinust1mathex/m/n/10 �
....\hbox(2.982+1.62048)x4.58798, shifted 8.4875
.....\LS1/libertinust1math/m/it/7 ^^M
....\glue(\thinmuskip) 1.66663
....\LS1/libertinust1math/m/it/10 f

where the subscript box contains the gamma and is wider but still only 4.59pt so not as wide as the difference in the width of the integral.

2
  • Thanks for the explanations. Can this be fixed by the maintainer of libertinust1math if I write to him? Or is this behavior "by design" and cannot easily be corrected?
    – quark67
    Commented May 22 at 15:23
  • err you could ask but it's possibly sort of by design (tex doesn't give a lot of control here) computer modern has exactly the same issue it just happens that the width of \gamma is quite close to the italic correction of the integral so for that specific example in computer modern the displacement is small, but for other subscripts or, as I show in the link here, an empty subscript, the basic problem is there for all fonts. @quark67 Commented May 22 at 15:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .