9

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!

4
  • 1
    Load relsize and try \mathlarger{\int}?
    – Bernard
    Commented May 8, 2019 at 20:56
  • Could we please see a full minimal example, so others can test
    – daleif
    Commented May 8, 2019 at 21:01
  • You can also try Asana Math, which also bases its letters on Palatino.
    – Davislor
    Commented May 9, 2019 at 7:55
  • All tex gyre math fonts have this problem, so I never use them. Maybe they should build a new release. Commented Oct 8, 2023 at 6:26

4 Answers 4

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

6
  • 1
    Is there a way to selectively enlarge the integral sign in some equations only using your method?
    – bonanza
    Commented Mar 10, 2020 at 17:28
  • Undefined control sequence. <inserted text> \Umathoperatorsize on xelatex Commented May 7, 2022 at 16:36
  • @1900011604 Yes. Did you read the question? It's even tagged with luatex. Commented May 8, 2022 at 14:17
  • Thanks! On xelatex here, same problem. TeX Gyre *** Math Integral sign all much too small Commented May 9, 2022 at 1:24
  • This seems to have a weird interaction with the physics packages: tex.stackexchange.com/q/715110/144146 Commented Apr 8 at 17:07
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}
9
  • a scale of 2 is too big in any case, but used to magnify the effect here. Commented May 8, 2019 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. Commented May 8, 2019 at 21:18
  • @UlrikeFischer ah I tried setting the whole thing again but that undid the scale... Commented May 8, 2019 at 21:19
  • @UlrikeFischer still doesn't get it quite right, I'll add an image Commented May 8, 2019 at 21:23
  • 2
    @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 Commented May 9, 2019 at 10:05
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}
2
  • 1
    The subscript position is wrong. Commented May 9, 2019 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. Commented May 9, 2019 at 8: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

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

You must log in to answer this question.

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