[texhax] unexplained space

Oleg Katsitadze olegkat at gmail.com
Wed May 9 11:50:02 CEST 2007

On Tue, May 08, 2007 at 03:59:36PM -0500, Karl Berry wrote:
> when TeX is looking for a <space>, the code following is
> expandable (\if..., in that case), and it's happening inside an
> alignment template.

One very common situation when TeX is looking for a <space> is when it
delimits a number.  For example, when running the following through


you'd get:

  > 12.
  l.3 \showthe\count0

Hence another rule of thumb:  always leave a <space> after a number
(or put \relax there).  This is particularly nasty when a number comes
before a macro parameter, because you never know what will be in the


BTW, watch out for a similar caveat with glues:

  \vskip 1pt

If #1 happens to start with `plus' or `minus', TeX will either throw
`Missing number' at you (if a <dimen> does not follow `plus' or
`minus'), or add the stretching/shrinking to \vskip.  \relax is your
friend here, too (or else, always specify `plus 0pt minus 0pt').


More information about the texhax mailing list