8

I am writing my thesis and I use the TeX Gyre Pagella Math fonts, but I have noticed that the integral sign is much too small compared to fractions.

enter image description here

as you can see in the above image. I am using LuaLaTeX.

Is there any way to make the integral sign a more sensible size?

A minimal example:

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{TeX Gyre Pagella Math Regular}

\begin{document}
    \begin{equation}
    f(a) = \frac{1}{2\pi i}\int_\gamma \frac{f(z)}{z-a}\mathrm d z
    \end{equation}
\end{document}

Thanks in advance!

Zarko
  • 296,517
msx
  • 491
  • 4
  • 11

4 Answers4

9

Simply adjust the DisplayOperatorMinHeight font parameter. That also indicates that the font is broken.

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{TeX Gyre Pagella Math}
\everydisplay{\Umathoperatorsize\displaystyle=5ex}
\begin{document}

\[\int_\gamma\frac{f(x)}{z-a}\]

\end{document}

enter image description here

Henri Menke
  • 109,596
5

with xelatex you get

enter image description here

but with lualatex you get

enter image description here

from

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{TeX Gyre Pagella Math}
\setmathfont{TeX Gyre Pagella Math}[range=\int,Scale=2]


\begin{document}

\[\int_\gamma\frac{f(x)}{z-a}\]

\end{document}

I'm not sure if the difference is in unicode-math or the underlying luatex math rendering, the scaled font for \int has caused the math parameters used for fraction spacing (and other things) to be scaled. I'll ping Will...

as Ulrike points out you can reset the parameters with an additional mathfont setting, resulting in

enter image description here

which doesn't produce quite the result xetex does but usable.

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{TeX Gyre Pagella Math}
\setmathfont{TeX Gyre Pagella Math}[range=\int,Scale=2]
\setmathfont{TeX Gyre Pagella Math}[range=\sum]


\begin{document}

\[\int_\gamma\frac{f(x)}{z-a}\]

\end{document}
David Carlisle
  • 757,742
5

\Uhextensible seems to work:

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{TeX Gyre Pagella Math}


\begin{document}
\[\int _\gamma\frac{f(x)}{z-a}\]

\[ \Uhextensible width 2ex "0 "00222B_\gamma\frac{f(x)}{z-a}\]

\end{document}

But I have no idea why and which width is sensible.

enter image description here

After a bit digging in the context code I found also an (undocumented) \Uvextensible which looks more sensible:

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{TeX Gyre Pagella Math}


\begin{document}
\[\int _\gamma\frac{f(x)}{z-a}\]

\[ \mathop{\Uvextensible height 15pt depth 15pt exact axis\Udelimiter "0 "0 "222B}\nolimits_\gamma\frac{f(x)}{z-a}\]

\end{document}
Ulrike Fischer
  • 327,261
  • 1
    The subscript position is wrong. – Henri Menke May 09 '19 at 00:09
  • @HenriMenke I'm not quite happy with it either. The code in context (\autointegral) forces \limits with the comment that "\nolimits is difficult because of kerning problems". But simply making the integral always large doesn't look good either too. – Ulrike Fischer May 09 '19 at 08:30
0

The following takes the integrals from libertinus math:

\documentclass{article}
\usepackage[libertinus]{pagella-otf}

\begin{document} [ f(a) = \frac{1}{2\pi i}\int_\gamma \frac{f(z)}{z-a}\mathrm d z ]

the old behaviour: \setmathfont{texgyrepagella-math.otf} [ f(a) = \frac{1}{2\pi i}\int_\gamma \frac{f(z)}{z-a}\mathrm d z ] \end{document}

enter image description here

user187802
  • 16,850
  • 1
    Hum… I get Error: Unknown option libertinus for package pagella-otf. This option is not mentioned in the pagella-otf documentation. – Daniel Flipo Oct 15 '22 at 11:03
  • you need version 0.02: https://ctan.org/tex-archive/fonts/pagella-otf I suppose it is not mirrored on all machines, hopefully for tomorrow – user187802 Oct 15 '22 at 14:58