I have noticed that I hardly ever use the \negthinspace command \!.
This is because I don't know how to use it properly (I do use other spacing commands quite a bit, because I can better understand the guidelines of when they might be useful). When might it be considered appropriate to use this spacing command?
- 651
5 Answers
Knuth in the TeXbook described the following spacing commands:
\, thin space (normally 1/6 of a quad);
\> medium space (normally 2/9 of a quad);
\; thick space (normally 5/18 of a quad);
\! negative thin space (normally 1/6 of a quad).
They are normally used in equations if you want to adjust the spacing slightly:
$x^2\!/2$
$\Gamma_{\!2}+\Delta^{\!2}$
Also when physical units appear in a formula, they should be set in roman type and separated from the preceding material by a thin space (the package "siunitx" does that). Other cases is after the factorial (!) etc.
The TeXbook definition is shown below:
\def\,{\mskip\thinmuskip} \def\!{\mskip-\thinmuskip}
- 117,160
I often use \! in exponents after big closing parentheses:
\documentclass{minimal}
\begin{document}
\[
\left( 1 + \frac{1}{n} \right)^{n} \quad
\left( 1 + \frac{1}{n} \right)^{\!n}
\]
\end{document}

For me, the "n" is too far away from the parenthesis in the first version.
- 37,935
\! is a convenient abbreviation for a small negative space. Specifically, it's a negative \thinmuskip, which would normally be -.16667em. Though \thinmuskip might be redefined.
\! is often used for fine-tuning math formulas. But when does it happen, that \thinmuskip perfectly fits for the negative correction?
Though \! is easy to write, I tend to use \kern (or \hspace) with the best value instead of relying on -\thinmuskip coincidentally matching perfectly. So I can understand that you hardly ever use \!.
- 231,401
-
1Is a
\thinmuskipreally measured in terms of em? Page 168 of the TeXbook claims that\thinmuskip = 3mu,\medmuskip = 4mu plus 2mu minus 4muand\thickmuskip = 5mu plus 5mu---at least in Plain TeX. – David R Apr 20 '17 at 19:11 -
1@DavidRobertson
1muis1/18em(of one of the active fonts,fam2, not sure what that means), so in that sense the answer is mostly right. https://tex.stackexchange.com/questions/41913/how-to-get-less-spacing-in-math-mode#comment85336_41917 – Blaisorblade Jul 22 '17 at 05:15 -
What exactly does "with the best value" mean and how is it determined? – Geoff Pointer Sep 04 '17 at 04:50
Here are a few more examples of use of negatives spaces in math formulas (I’m not limiting myself to \! because, as Stephan mentioned in his answer, it’s not always the right amount). The choice of the amount of negative spacing is not absolute, and depends on both the font and whether it seems good to your eye:

- 28,978
-
2Let me emphasize that (IIUC) one should stick if possible to math units
mu(as you do) for space adjustments in a math context, to make code more robust in the face of font changes. But I've seen answers elsewhere using points or other units, so maybe I'm missing something. – Blaisorblade Jul 22 '17 at 05:13
Another use I have for \! is if I'm writing larger numbers in math mode where I need to use the comma separator. Since math mode treats comma as though it's used in text, it automatically adds a space. \! removes that space. Compare, for instance:
from $7,000$
and
from $7,\!000$
- 65
:-)(And the new paragraph in your edit is only about\,, which wasn't asked for.) – Hendrik Vogt Jan 16 '11 at 20:50$x^2\!/2$; this is also an example Knuth gave somewhere. – Hendrik Vogt Jan 16 '11 at 21:06\mathbb{F}_{\!p}and\mathbb{A}^{\!n}(of course, I would avoid typing\!often in my source code and wrap everything in macros). The need to use\!for some subscripts is because of an incorrect italic correction for the glyph in the TFM file (this is the case for\Gamma,\mathrm{F},\mathbb{F}and others) while for superscript it is due to an unfortunate limitation of TeX (lifted in Opentype font, thankfully). – Philippe Goutet Jan 16 '11 at 22:49\,which come a bit out of nowhere. – Hendrik Vogt Jan 17 '11 at 09:11