0

Differential quantities with the mtpro2 font package don't typeset correctly (I think) because of the italic correction on the d character.

Using this post

Math letter's italic correction

I decided to try and remove the italic correction. While this works for some differentials, it doesn't work for all of them. MWE:

\documentclass{article}
\usepackage{mtpro2}
\usepackage{mathtools}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand*\ric[1]{\vphantom{#1}\smash{#1_{}\kern-\scriptspace}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\[
\begin{matrix}
 \text{with italic correction} &dx & d\tau \\
 \text{without italic correction} &\ric{d}x & \ric{d}\tau
\end{matrix}
\]
\[
\begin{matrix}
 \text{with italic correction} &df & dj \\
 \text{without italic correction} &\ric{d}f & \ric{d}j
\end{matrix}
\]
\end{document}

and output tex output

Clearly d\tau and dx benefit enormously from having the italic correction removed whereas df and dj suffer and get moved too far apart. The discussion in

https://tex.stackexchange.com/a/557217/95517

seems to suggest that this is because mtpro2 defines the font metrics for d differently from Computer Modern, which treats d primarily as a differential operator. How can I get the spacing for d to be that of a differential operator?

  • Anyway, the differential should be typed in upshape – it is not a variable. – Bernard Mar 15 '22 at 22:58
  • 1
    @Bernard That's not true. Perhaps you prefer it upright, but many people have different opinions. – egreg Mar 15 '22 at 23:04
  • @egreg: I think using italic like a variable is very confusing. It is an operator, after all. – Bernard Mar 15 '22 at 23:10
  • @Bernard It is not an operator in this case (or not necessarily interpreted as an operator, if you wish). To me the whole “dx” is a variable. – egreg Mar 15 '22 at 23:14
  • For me, it is an infinitesimal increment of the variable x. And df is the linear map that is the best linear approximation of the function f in a neighbourhood of a point x. – Bernard Mar 15 '22 at 23:22
  • TeX adds both the italic correction and the kern for the pair of characters if they come from the same font; there is no kern defined between “d” and ”tau”. I think it was a bad choice to define an italic correction for d. – egreg Mar 15 '22 at 23:23
  • @Bernard For me, “infinitesimal increment” is nonsense. – egreg Mar 15 '22 at 23:23
  • 1
    @egreg Since you think the italic correction for "d" is a bad idea, what do you think is a good workaround that doesn't mess up the spacing for "df"? Is the only solution editing the tfm file? – occamsrazor Mar 15 '22 at 23:31

0 Answers0