1

I use the classic thesis style which uses the Palatino font (TeX Gyre Pagella). So it uses the companion math font TeX Gyre Pagella Math as well. My problem with it is, I do not like how the letter "y" looks in the math font. The curve is rather "v"-shaped and I would prever it to be "u"-shaped which would make the letter look softer.

I tried to change to Asana Math, but there is the same problem. I also do not like the Euler Math font which does fit with the Palatino font, but has some mathematical features that bother me.

Latin Modern Math looks good by itself but looks odd when used together with the Palatino font.

So I wonder if it is possible to change just the letter y in the math font to make it a bit more rounded?

(I use LuaLatex by the way and unicode-math)

Here is a MWE, that shows the Palatino font together with Latin Modern Math, Pagella Math and Asama Math.

\documentclass{article}

\usepackage{fontspec}
\setmainfont{TeX Gyre Pagella}

\usepackage{amsthm}
\newtheorem{theorem}{Theorem}

\usepackage{unicode-math}

\begin{document}

\setmathfont{Latin Modern Math}
This is just some text to test the font.

$x + y = z^2$

\begin{theorem}
Test $x$ and $y$ blah blah.
 \[x + y = z^2\]
\end{theorem}
\begin{proof}
$x + y = z^2$
\end{proof} 

\section{Test}

test test test.

\setmathfont{Asana Math}
This is just some text to test the font.

$x + y = z^2$

\begin{theorem}
Test $x$ and $y$ blah blah.
 \[x + y = z^2\]
\end{theorem}
\begin{proof}
$x + y = z^2$
\end{proof} 

\section{Test}

test test test.

\setmathfont{TeX Gyre Pagella Math}
This is just some text to test the font.

$x + y = z^2$

\begin{theorem}
Test $x$ and $y$ blah blah.
 \[x + y = z^2\]
\end{theorem}
\begin{proof}
$x + y = z^2$
\end{proof} 

\section{Test}

test test test.

\end{document}
3
  • I'm not sure, but try with mtpro2 family...Also, it is helpful if you provide a MWE for further checking purpose... – MadyYuvi Mar 3 '20 at 11:51
  • 1
    @MadyYuvi I just had a look at mtpro2, however it is not free which prevents me from using it. There is a light version that is free, but this does not include blackboard bold fonts as far as I can tell. – Loreno Heer Mar 3 '20 at 12:02
  • 3
    Both Asana Math and Pagella Math use the italic “y” as in the text font. There's no apparent reason for using a different one. – egreg Mar 3 '20 at 16:10
1

If you find a font where you like the y glyph, then you can setup the math font in your document to use this secondary font for this single character only. Note that this usually does not produce good results, because it is generally quite visible that the character is from a different font.

The substitution can be done using the range option for \setmathfont. The math italic y is defined as \mity in the range table. You need to map the y to \mity to make this work (it is the same character, only accessed differently). This can be done by making the y active in math mode and redefining it, similar to, e.g., how to redefine single letter in math mode.

MWE:

\documentclass{article}

\usepackage{fontspec}
\setmainfont{TeX Gyre Pagella}

\usepackage{amsthm}
\newtheorem{theorem}{Theorem}

\usepackage{unicode-math}
\begin{document}
\section{Test}

\setmathfont{TeX Gyre Pagella Math}
% map the y character to \mity
\begingroup\lccode`~=`y \lowercase{\endgroup\def~}{\mity}
\mathcode`y="8000
% set Latin Modern Math only for this character
\setmathfont{Latin Modern Math}[range=\mity]
This is just some text to test the TeX Gyre Pagella font.

$a + y = z^2$

\begin{theorem}
Test $x$ and $y$ blah blah.
 \[x + y = z^2\]
\end{theorem}
\begin{proof}
$x + y + u + j = \mathbb{R}^2$
\end{proof} 

$x + y + u + j = z^2$
\end{document}

Result:

enter image description here

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.