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.)
Whether or not there is "more space" depends on where you measure from. If (as in your example) the rules are placed on equally spaced baselines, then there is less space between the tops of the letters and the top rule than from the bottoms of the letters and the bottom rule. However it does mean that the space between the rules depends only on the number of lines, not on the content of the text.
You can remove the equal baseline requirement but then the top rule position moves if there are no uppercase letters on the first line, and the bottom moves if there are descenders.
There are of course variants where you adjust the space one way or another, but first you have to define "tight".
\documentclass{article}
\setlength\parindent{0pt}
\setlength\textwidth{5cm}
\begin{document}
\rule{\linewidth}{0.4pt}
1 This is a paragraph, possibly with more than 1 line of text.
\rule{\linewidth}{0.4pt}
\bigskip
\rule{\linewidth}{0.4pt}
\nointerlineskip
2 This is a paragraph, possibly with more than 1 line of text.
\nointerlineskip
\rule{\linewidth}{0.4pt}
\bigskip
\rule{\linewidth}{0.4pt}
3 This is a paragraph, possibly with more than 1 ggg.
\rule{\linewidth}{0.4pt}
\bigskip
\rule{\linewidth}{0.4pt}
\nointerlineskip
4 This is a paragraph, possibly with more than 1 ggg.
\nointerlineskip
\rule{\linewidth}{0.4pt}
\bigskip
\rule{\linewidth}{0.4pt}
5 this is a paragraph, possibly with more than 1 line of text.
\rule{\linewidth}{0.4pt}
\bigskip
\rule{\linewidth}{0.4pt}
\nointerlineskip
6 this is a paragraph, possibly with more than 1 line of text.
\nointerlineskip
\rule{\linewidth}{0.4pt}
\end{document}
Best Answer
You could use the
\xspace
macro of the eponymous package. Consider the following MWE (minimum working example):Of course, nothing's ever perfect, and that applies to
\xspace
as well. To read up on some of its potential shortcomings (which I generally find too dreadful), you may want to read the posting Drawbacks of xspace.