[texhax] The effect of the space character

Philip TAYLOR P.Taylor at Rhul.Ac.Uk
Sun May 23 10:49:32 CEST 2010



P. R. Stanley wrote:

 > "... you shouldn't leave any blanks next to the tilde, since they will
 > count as additional spaces."
 >
 > What kind of blanks is the author refering to here? I thought additional
 > space chars (ASCII 32) had no impact on the output. Could he be refering
 > to macros such as the quad, qquad etc.?

No, he means real spaces.  Although TeX will gobble up spaces
after a control word (backslash, one or more letters) it will
not gobble up spaces after a control symbol (backslash, one
non-letter) nor after an active character such as the tilde.

Of course, when he says "additional space/s/", it is possible
to misinterpret this : no matter how many adjacent spaces you leave
alongside the tilde, they will count as at most one (to the left)
and exactly one (to the right).  The reason for "at most one (to
the left)" is that if these follow a control word, then all
will be gobbled up; if they follow anything else, they will
have the effect of a single space. [1]

 > "If you put tilde at the very end of a line in your input file, you'll
 > get a wider space than you want, because the return that follows the
 > tilde produces an extra space."
 >
 > Is this extra space horizontal or vertical? If horizontal, how would a
 > space differ visually from the rest of the page with no printing?

You would get one space from the tilde, immediately followed
by another space from the end of line "space".  Both would
be horizontal spaces.

** Phil.
--------
[1] Note added after reviewing content.


More information about the texhax mailing list