12

The situation

In the standard Computer Modern (and also in Latin Modern) the math-mode minus and plus symbols are, in some font sizes, not of the same width. This causes slight misalignments in formulas. I would like to redefine the math-mode - to have the same width as +, in any font size.

The example

\documentclass[12pt]{standalone}%
%
\begin{document}%
\newlength{\test}%
\begin{tabular}{rll}%
textstyle & \fbox{$-$} & \settowidth{\test}{$-$}\the\test\\
textstyle & \fbox{$+$} & \settowidth{\test}{$+$}\the\test\\
scriptstyle & \fbox{$\scriptstyle-$} & \settowidth{\test}{$\scriptstyle-$}\the\test\\
scriptstyle & \fbox{$\scriptstyle+$} & \settowidth{\test}{$\scriptstyle+$}\the\test\\
scriptscriptstyle & \fbox{$\scriptscriptstyle-$} & \settowidth{\test}{$\scriptscriptstyle-$}\the\test\\
scriptscriptstyle & \fbox{$\scriptscriptstyle+$} & \settowidth{\test}{$\scriptscriptstyle+$}\the\test\\
\end{tabular}%
\end{document}%

compiled example

This shows that the minus is wider than the plus in both 12pt and 6pt math fonts, but has the same width in 8pt.

The solution?

I'll post one below, but I am not happy with it.

wea0
  • 612
  • 2
    i'm not surprised that the 12pt plus and minus have different widths, because the plus is in cmr12, which has a slightly narrowed aspect ratio, and the minus is scaled from cmsy10, since cmsy12 doesn't exist. but i am surprised that the 6pt widths are different, since both cmr6 and cmsy6 were among the "original 75" fonts defined with metafont. i will investigate further when time permits. – barbara beeton Apr 10 '17 at 21:19
  • 1
    \mathrlap{+}\phantom{-} ? – John Kormylo Apr 11 '17 at 03:12
  • John, this is worse than my solution (see below), because it does not even bother to center the plus in the width of the minus. 2. Anyway, defining a symbol that is a minus with the width of a plus is not that hard (again, see below), but I don't like the drawbacks of redefining the minus character. Does anyone know whether it is instead possible to automatically modify the font files such that the width of the minus is changed, without redefining the minus character in latex?
  • – wea0 Apr 18 '17 at 10:57
  • So, am I stuck with either having a - which does not possess the same width as +, or having a - that does not work in superscripts? Is there any way to define a new command which exhibits \mathbin spacing and simultaneously works when used as a superscript without having to be enclosed in parentheses? – wea0 Jul 29 '17 at 00:13