[Tex/LaTex] Exhaustive list of use cases for the interword space \␣

spacing

The Guide to LaTeX (4e) states that \␣ is a "[n]ormal space between words after a command without arguments or after a period that is not the end of a sentence" (p. 467).

For the former case (\somecommand\ nextword), there is {} (\somecommand{} nextword), and for the latter case, there is \@ (used as .\@, not \@.!). So why would one use \␣ at all? Is \␣ perhaps not needed in LaTeX? When is \␣ really the best macro to use (better than the alternatives {} and \@)?

Note: ~ is for creating an interword space that cannot be line-broken, such as in Dr.~Smith; there are a number of other use cases (figure~\ref{...} and such), and they have been enumerated elsewhere, but the precise list is not important here (see links below).

Related:

Best Answer

The following two constructions,

This is the 1.{} sentence.

and

This is the 1.\ sentence.

have different results. You get a sentential space in the first case and the interword space in the second. Why? In the first case {} begins and ends a group, but in the end, the effect is null: the last item in the horizontal box is a . and spacefactor still has the sentential-space value (3000 by default), so the following space in appended with the sentential spacefactor value. In the second case, \␣, a primitive TeX command, directly appends glue to the horizontal box, "using the same amount that a space token inserts when the space factor is 1000" (TeXbook p. 285).

To extend the example to \␣ vs. {} to usage after an argumentless command, imagine a macro that might expand to something ending with ..

\def\macro{1.}

Then, for the same reason as above, the effect of the following two chunks of code is different.

This is the \macro{} sentence.

This is the \macro\ sentence.

In this case, I would use the second construction, because the assumption is that the result of \macro is a non-sentential phrase, like a single word. If, however, \macro might expand to something sentential, using the first construction would be better since then the ending punctuation of the macro (if any) would control the width of the space following it.

EDIT: As Bruno Le Floch pointed out in a comment, a well-written macro should be defined as \def\macro{1.\@}, "to avoid hiding a change in space factor inside a macro". Thus, in a perfect world, the difference between \macro{} and \macro\␣ disappears.

Regarding \␣ vs. \@␣, I know of no difference between them (barring the pathological situations like some macro tearing apart \@ and or somebody changing the value of \@m which \@ depends on). Thus I'd agree with the comments that using one or another is truly a matter of style. (By the way, I find it somewhat funny that \␣, which seems more complex on the surface, is actually a primitive TeX command.)