Math mode adds extra horizontal space after superscripts. I have listed various options for removing it in the MWE. I would like to know if there is any recommended way of doing this in amsmath
.
I am thinking of using \negthickspace
for now. However, I am interested to know if that looks too tight for a professional typographer. As my thesis has a lot of superscripts, this small decision is going to make a lot of difference in the look and feel of the whole document.
MWE:
\documentclass[preview]{standalone}
\usepackage{amsmath}
\begin{document}
%\noindent
$R(u,x) = R(u^{*},x)$
$R(u,x) = R(u^{*}\!,x)$
$R(u,x) = R(u^{*}\negmedspace,x)$
$R(u,x) = R(u^{*}\negthickspace,x)$
$R(u,x) = R(u^{*}\!\!,x)$
\end{document}
EDIT:
The default behaviour of latex looks more reasonable when you write $u^{*}\negmedspace \Sigma &= R(u^{*}\negmedspace,\Sigma)$
which yields
So if a global macro is to be written to introduce this negative spacing then it has to take into account the character that comes after the superscript. I don't know if this is possible or advisable.
Best Answer
The next example only adds some boxes to make the spacing more visible:
The spacing between the superscript
*
and the comma,
has three causes:\scriptspace
after super- and subscripts. Default is0.5pt
in LaTeX and plain TeX. It is the space between the box around*
and the surrounding box.*
and,
there is some horizontal padding, called side bearings. It is a font property and not accessible in TeX.However, caution is needed for the negative spacing, LaTeX defines (pseudo code):
and package
amsmath
adds (pseudo code):\thinmuskip
and therefore\!
are not using stretchability. However, the others are. Then the spacing can become quite ugly, if stretching/shrinking is applied. The negative sign causes the opposite effect making the spacing worse:For this,
\!
can be used. However,\negthickspace
and\negmedspace
should be avoided, they cancel the effect of\thickmuskip
and\thinmuskip
.\negthickspace
and\negmedspace
The following macros
\negmed
and\negthick
add a negative space in math mode using the values from\medmuskip
and\thickmuskip
without the stretch and shrink components:The question, how much negative spacing could be used is also partly a matter of taste. I tend to something inbetween
\!
and\negmed
, perhaps\mkern-3.5mu\relax
.