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:
- (meant-to-be-)exhaustive list of use cases for
\@
: - (meant-to-be-)exhaustive list of use cases for
~
:- an answer to "When should I use non-breaking space?" and
- an answer to "What is the right way to use of non-breakable space before math expressions?"
- Note that these follow Knuth's personal taste, which is not necessarily known or followed at all outside of the TeX community! There is good judgment behind his recommendations, but it's unclear whether not following them is much of a problem; one also needs to balance this against too much interword spacing. For example:
- The Chicago Manual of Style's online Q&A writes somewhere in the "Manuscript Preparation" section: "CMOS does not prohibit a numeral at the beginning of a line, but if in a given context the numeral looks confusing, by all means mark it to be brought up."
Best Answer
The following two constructions,
and
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.
.Then, for the same reason as above, the effect of the following two chunks of code is different.
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.)