# TeX Gyre Pagella Math Integral sign much too small

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.

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}
$$f(a) = \frac{1}{2\pi i}\int_\gamma \frac{f(z)}{z-a}\mathrm d z$$
\end{document}


• Load relsize and try \mathlarger{\int}? – Bernard May 8 '19 at 20:56
• Could we please see a full minimal example, so others can test – daleif May 8 '19 at 21:01
• You can also try Asana Math, which also bases its letters on Palatino. – Davislor May 9 '19 at 7:55

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}


• Is there a way to selectively enlarge the integral sign in some equations only using your method? – bonanza Mar 10 at 17:28

with xelatex you get

but with lualatex you get

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

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}

• a scale of 2 is too big in any case, but used to magnify the effect here. – David Carlisle May 8 '19 at 21:17
• The last math font sets the math fontdimens etc, so add e.g. \setmathfont{TeX Gyre Pagella Math}[range=\sum] as last entry. – Ulrike Fischer May 8 '19 at 21:18
• @UlrikeFischer ah I tried setting the whole thing again but that undid the scale... – David Carlisle May 8 '19 at 21:19
• @UlrikeFischer still doesn't get it quite right, I'll add an image – David Carlisle May 8 '19 at 21:23
• @msx the project is based here gust.org.pl/projects/e-foundry/tg-math/index_html but I'm not sure of the preferred reporting mechanism – David Carlisle May 9 '19 at 10:05

\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.

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}

• The subscript position is wrong. – Henri Menke May 9 '19 at 0: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 9 '19 at 8:30