2

I'm using mtpro2 for math. In the original math-alphabet (the font mtpro2 uses), the letters seem to have greater spacing around them than what I would like. For example:

$ GM = tc^3 $

produces

No-no

But I would rather have something like

$ \textit{GM} = \textit{tc}^3 $

which appears like

Yes-yes

where the letters are closer together. Is there a way to add negative spacing between variables in math-mode? I have tried the thinmuskip, medmuskip and thickmuskip, but they only take care of the spacing around operators, not variables (I think).

1
  • 2
    tex adds no space there so there is no equivalent to \thickmuskip the spacing is in the font: math italic usually has wide sidebearings so as to make adjacent letters look separate, not combining to form a single word. you could make every letter math active (\mathcode"8000 and define it to add negative space but choosing a different font is a less fragile alternative. Commented Dec 11, 2015 at 1:35

1 Answer 1

5

Comparison

Let's do a comparison of the available free varieties Times fonts for math typesetting. The input file is (properly commented for the various cases)

\documentclass{article}

%\usepackage{mathptmx}
%\usepackage{txfonts}
%\usepackage{newtxtext,newtxmath}
%\usepackage[lite]{mtpro2}

\usepackage{unicode-math}
%\setmainfont{XITS}\setmathfont{XITS Math}
\setmainfont{TeX Gyre Termes}\setmathfont{TeX Gyre Termes Math}

\begin{document}

$GM=ct^3$

\end{document}

1. Legacy Times — mathptmx

enter image description here

2. TXfonts

enter image description here

3. NewTX

enter image description here

4. MTPro2

enter image description here

5. XITS Math (or STIX Math)

enter image description here

6. TeX Gyre Termes Math

enter image description here

Comments

As you can see, apart from the kerned GM in case 1, the output is pretty similar. Nobody should use mathptmx for serious math typesetting: it was a good compromise at a time where no alternative was available. However, the letters G and M should not be kerned if they represent the product of two variables. The same, of course, should be said about c and t.

The main difference between MTPro2 and the other fonts is that the letters are wider. The width of $GM$ in with NewTX is 17.14pt, with MTPro2 it is 18.07pt (the images above might suggest the contrary, look at them at full screen). Also the exponents are quite farther from the base (and digits are specially crafted).

You may like kerned math, but there must be a reason why no math font does it except for mathptmx (but, as I explained, this is not to be regarded as exemplary). The reason is precisely “giving the reader clues about how to interpret math formulas”.

Maybe MTPro2 is too generous with sidebearings for math letters: it's a precise design choice by the font designer.

Can you remove the sidebearings with TeX parameters?

No. The sidebearings are decided by the font and TeX adds kerns as guided by its internal rules, according to the parameters in the fonts. Here's a representation of the formula with MTPro2; when TeX writes no space between \kern and the number, it means it's an implicit kern, added according to the font metric file.

....\mathon
....\LMP1/mtt/m/it/10 G
....\kern0.59999
....\kern-1.00002
....\LMP1/mtt/m/it/10 M
....\kern1.4
....\glue(\thickmuskip) 2.77771 plus 2.77771
....\LMP2/mtt/m/n/10 D
....\penalty 500
....\glue(\thickmuskip) 2.77771 plus 2.77771
....\LMP1/mtt/m/it/10 c
....\kern0.53
....\LMP1/mtt/m/it/10 t
....\kern1.0
....\hbox(4.72499+0.0)x4.60199, shifted -3.62999
.....\LMP1/mtt/m/it/7 3
....\mathoff

The same with NewTX is

....\mathon
....\OML/ntxmi/m/it/10 G
....\OML/ntxmi/m/it/10 M
....\kern1.09
....\glue(\thickmuskip) 2.77771 plus 2.77771
....\U/ntxmia/m/it/10 =
....\penalty 500
....\glue(\thickmuskip) 2.77771 plus 2.77771
....\OML/ntxmi/m/it/10 c
....\kern0.36
....\OML/ntxmi/m/it/10 t
....\kern0.09999
....\hbox(4.93114+0.09854)x4.15, shifted -3.62999
.....\OT1/ntxtlf/m/n/7.3 3
....\mathoff

The comparison shows that MTPro2 does much more kerning than NewTX, showing that much more care has been put into it; whether the results are good is the customer's choice.

You must log in to answer this question.

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