[texhax] unexplained space
Philip G. Ratcliffe
philip.ratcliffe at fastwebnet.it
Tue May 8 20:49:02 CEST 2007
> Some of my macros yield unexpected space to the
> left and/or
> right of what is the expected return.
> [snip]
I'm not sure why, but your email got formatted terribly in my client
(Windogs Outlook); that's why I "snipped" it.
Anyway, a reasonable rule-of-thumb is to put a comment (%) at the end of
every line that would otherwise end with a right brace (}). That is, write
\typeout{Hello Wordl}%
To be more explicit, a simple command with no parameters, such as \par,
\else, \centering etc. will always eat the following space while, say,
\typeout{Hello World} will not (ie, the space will remain as a physical
space in your output). And the end-of-line character is always interpreted
as a space.
That said, there are, of course, always exceptions.
So, just add end-of-line comments until you're happy.
Cheers, Phil
More information about the texhax
mailing list