7

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!

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

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

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

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}
  • a scale of 2 is too big in any case, but used to magnify the effect here. – David Carlisle May 8 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 at 21:18
  • @UlrikeFischer ah I tried setting the whole thing again but that undid the scale... – David Carlisle May 8 at 21:19
  • @UlrikeFischer still doesn't get it quite right, I'll add an image – David Carlisle May 8 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 – David Carlisle May 9 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.