You can define your own symbol:
\documentclass{article}
\usepackage{amsmath}
\DeclareMathSymbol{\subfactorial}{\mathord}{operators}{"3C}
\begin{document}
\begin{equation}
\begin{aligned}
n!=\sum_k h(n,k) &= \sum_k \binom{n}{k}(n-k)\subfactorial\\
&=\sum_k\binom{n}{k}k\subfactorial
\end{aligned}
\tag{5.49}
\end{equation}
\end{document}
This will work so long as the "operators" font is OT1 encoded. Should it be T1 encoded, change "3C"
into "BD
(this might depend on your font settings).
The equation (same number) is taken from "Discrete Mathematics", by Graham, Knuth and Patashnik (the original uses Euler fonts, but the result is quite similar).
There is some glue in \:
, but not in \!
: the first uses \medmuskip
which is 4.0mu plus 2.0mu minus 4.0mu
, the second \thinmuskip
which is 3.0mu
. To avoid the glue use only \!
or, simpler, just \mkern
:
\documentclass[a5paper]{article}
\newcommand{\md}{\ensuremath{M\mkern-9mu D}}
\begin{document}
a a a a a a a a a a a a a a a a a a a a a a $\md$ a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
aaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaa $\md$ aaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaa aaaaaaaaaa aaaaaaaaaaa aaaaaaaaaaaaa aaaaaaaaaaaaa
aaaaaaaa
\clearpage
\hbox{aa aa $\md$ aa aa}
\hbox spread 10pt{aa aa $\md$ aa aa}
\hbox spread 20pt{aa aa $\md$ aa aa}
\end{document}
As 18mu = 1em
this is much closer spacing than you ask for, use -2mu
instead.
The numbers in my statements above come from:
\documentclass{article}
\begin{document}
\( \show\!\show\: \)
\showthe\thinmuskip
\showthe\medmuskip
\end{document}
which prints the following infomation in the log file:
> \!=macro:
->\mskip -\thinmuskip .
l.10 \( \show\!
\show\: \)
> \:=macro:
->\mskip \medmuskip .
l.10 \( \show\!\show\:
\)
> 3.0mu.
l.11 \showthe\thinmuskip
> 4.0mu plus 2.0mu minus 4.0mu.
l.12 \showthe\medmuskip
As far as I can see, in standard latex, the glued skips \medmuskip
and \thickmuskip
, are only used around binary and relation symbols, and in the definition of \bmod
.
Best Answer
Spacing commands for text mode can also be used in math mode, but not conversely, unless you load
amsmath
(for a couple of them).The LaTeX kernel defines
\,
\:
and\;
for\mskip\thinmuskip
,\mskip\medmuskip
and\mskip\thickmuskip
respectively. For reference\,
is the space between an ordinary symbol and an operator or conversely (like in2\sin x
) or after a punctuation symbol;\:
is the space around a binary operation symbol (like ina+b
);\;
is the space around a relation symbol (like ina>b
).However, the LaTeX kernel defines
\,
to be also used in text mode, inserting a kern of width 0.1667em (3/18-th of an em). Ifamsmath
is loaded, also\:
and\;
can be used in text mode, inserting kerns of 0.2222em (4/18-th of an em) and 0.2777em (5/18-th of an em). These width are the same natural widths of the math mode spacings, expressed inem
units (but the em can differ).Specific math mode spacing indeed uses
mu
units, where 18mu is the same as 1em in the math symbol font. Such units can only be used as arguments to\mskip
or\mkern
, which is legal only in math mode. On the other hand, standard units and\hskip
or\kern
can appear in math mode as well as in text mode (andem
will refer to the font current when math mode was started).This explains why
\quad
and\qquad
can be used in math mode: they will add 1em of space referring to the current text font. In some rare occasions\hspace
can turn out to be useful (notice the emphasis, though).Further readings
What commands are there for horizontal spacing?
Lengths and when to use them
Difference between \mskip and \mkern
How can we decide a glue or a kern when we are writing a macro?