Is there a qick guide about the issue?
Ciao
Read the FAQ:
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=spinmacro
Best regards,
Jose Carlos Santos
> I didn't know this thing of spurious spaces. When & where do you have
> to use % in order to avoid them?
LaTeX (actually TeX, I think) ignores whitespace at the beginning of a line
of source code, but it turns the newline at the end of a line into a space
in the output. If a line contains the comment character "%", then
everything from "%" to the end of the line, including the newline, is
ignored. Here's an example I found:
\item number of separate phrases%
\footnote{For example, it take five canned phrases (with variable
substitution) to read an e-mail with the usual fields (\texttt{From},
\texttt{Subject}, \texttt{Date} and \texttt{Body}).}
With the "%", there would be an incorrect space between "phrases" and the
footnote superscript in the main text.
HTH,
Adam
The FAQ answer that Jose linked to is probably the best answer, but
here's the quick guide:
Assuming nothing strange (such as a verbatim environment) is going on,
the following aspects of TeX are relevant:
The end of a line is treated as a space, unless it is preceeded
by a (normal) space.
Any spaces at the beginning of a line are ignored.
Any spaces after a macro with a multi-letter name (such
as \this, but not \$) are ignored.
The end-of-the-line space is treated as part of the comment,
if the line contains a comment character.
Thus, whenever there is a line break where (a) you do not wish to have a
space inserted, and (b) the line does not end with a macro with a multi-
letter name, you should end the line with a comment character, which
will comment out the space caused by the line break.
Note that this is a relatively rare occurrence in normal text; Adam's
\footnote example is one of the few cases where it arises. Normally you
_want_ the line break to insert a break, because it's separating two
words. The problem is common in macro programming, however, where often
the line break is separating things that shouldn't be separated by a
space in the output.
- Brooks
--
The "bmoses-nospam" address is valid; no unmunging needed.
You can have a look at /The Advanced TeXBook/ by Salomon (I think). It
is the best reference I found regarding this issue. Unfortunatly, I
don't have it anymore in my library...
--
Christophe
> Any spaces after a macro with a multi-letter name (such
> as \this, but not \$) are ignored.
...for values of "multi" greater than or equal to one.
--
Donald Arseneau as...@triumf.ca
Huh; I'd thought macros like \c were in the same category as \"; I guess
I should have checked. Anyhow, thanks for the correction!
>
> Any spaces after a macro with a multi-letter name (such
> as \this, but not \$) are ignored.
Spaces after "\ " are also ignored.
Dan