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!

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

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

4
  • 1
    Is there a way to selectively enlarge the integral sign in some equations only using your method?
    – bonanza
    Mar 10, 2020 at 17:28
  • Undefined control sequence. <inserted text> \Umathoperatorsize on xelatex May 7, 2022 at 16:36
  • @1900011604 Yes. Did you read the question? It's even tagged with luatex. May 8, 2022 at 14:17
  • Thanks! On xelatex here, same problem. TeX Gyre *** Math Integral sign all much too small May 9, 2022 at 1:24
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. 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. May 8, 2019 at 21:18
  • @UlrikeFischer ah I tried setting the whole thing again but that undid the scale... May 8, 2019 at 21:19
  • @UlrikeFischer still doesn't get it quite right, I'll add an image 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 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. 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. 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. 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
    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 .