[OS X TeX] Celsius
Gary L. Gray
gray at engr.psu.edu
Tue Feb 15 20:37:46 CET 2005
On Feb 15, 2005, at 2:24 PM, Herb Schulz wrote:
> I'm just getting started looking at the Siunits package but not having
> the
> space after \celsius is a classic problem you have to watch for. To
> find the
> end of a command which has a name (rather than a symbol, e.g., \&) TeX
> has
> to look for a non-normal-character, one or more space characters for
> example, WHICH ARE GOBBLED UP. So the space after \celsius is gobbled
> up by
> TeX. To generate a space you can do a couple of things: put a pair of
> braces
> after the command, e.g., \celsius{} and then space, or put a forced
> space
> character after it, e.g., \celsius\ (the `\ ') forces a space there.
> Characters that follow the command besides space act as terminators
> too but
> aren't gobbled up; e.g., \celsius, will have the comma after it. That
> is why
> you don't want to define the macro to force a space afterward;
> \celsius\ ,
> isn't correct. You see this happening all the time with the macro
> \TeX\ and
> its variants; look in many papers about \TeX.
You can also use the xspace package to take care of this "space after a
command" problem. It really helps to not have to remember it every
time.
All the best,
-- Gary
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
More information about the macostex-archives
mailing list