2

I am trying to scale the mtpro2 font to work with the newtxtext font package. That is because I observed that the inline math equations in the footnotes are slightly bigger or rather different than the text around it. I am sure that it is the case.

I have been trying to follow the answer of the question Scaling the mtpro2 fonts to work with Baskerville, and I only have one problem: what is the x-height of newtxtext? If I use the code from that answer without changing it, then the resulting math font will be smaller than the text font.

Here is an MWE for you to test your answer:

\documentclass{article}
\usepackage{newtxtext}
\usepackage[lite,subscriptcorrection,nofontinfo]{mtpro2}
\begin{document}
    Some ordinarily sized text. $x^2 + y^2 = z^2$\footnote{Some ordinarily sized footnote text. $x^2 + y^2 + z^2$ Here are two numbers, the first one is text, the second one is math: 0$0$}
\end{document}

P.S. Do you know an archive that has the x-heights of all the fonts? It will be really helpful.

1 Answer 1

1

The mtpro2 fonts are optically scaled and you need to apply different magnifications in order that they match the size of NewTX.

However this would make the digits smaller, so I also redefine the math codes of the digits to use the text font.

\documentclass{article}
\usepackage{newtxtext}
\usepackage[lite,subscriptcorrection,nofontinfo]{mtpro2}

\DeclareFontShape{LMP1}{mtt}{m}{it}{
  <-7>  s*[0.8588]  mt2mif
  <7-9> s*[0.9165]  mt2mis
  <9->  s*[0.97375] mt2mit
}{}
\DeclareMathSymbol{0}{\mathalpha}{operators}{"30}
\DeclareMathSymbol{1}{\mathalpha}{operators}{"31}
\DeclareMathSymbol{2}{\mathalpha}{operators}{"32}
\DeclareMathSymbol{3}{\mathalpha}{operators}{"33}
\DeclareMathSymbol{4}{\mathalpha}{operators}{"34}
\DeclareMathSymbol{5}{\mathalpha}{operators}{"35}
\DeclareMathSymbol{6}{\mathalpha}{operators}{"36}
\DeclareMathSymbol{7}{\mathalpha}{operators}{"37}
\DeclareMathSymbol{8}{\mathalpha}{operators}{"38}
\DeclareMathSymbol{9}{\mathalpha}{operators}{"39}


\textheight=4cm

\begin{document}

\sbox0{x}\the\ht0\ \sbox0{$x$}\the\ht0

{\footnotesize\sbox0{x}\the\ht0\ \sbox0{$x$}\the\ht0}

{\tiny\sbox0{x}\the\ht0\ \sbox0{$x$}\the\ht0}

Some ordinarily sized text. $x^2 + y^2 = z^2$\footnote{Some ordinarily 
  sized footnote text. $x^2 + y^2 + z^2$ Here are two numbers, the first
  one is text, the second one is math: 0$0$}

\end{document}

You may need to do similar adjustments also for other mtpro2 fonts.

How did I get the factors? Comment out the \DeclareFontShape declaration and you'll see the different heights, from which I computed the scaling factors.

enter image description here

Here are the figures without the scaling.

enter image description here

1
  • Thanks, it works well for me. Commented Feb 11, 2023 at 11:57

You must log in to answer this question.

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