[OS X TeX] Celsius

Herb Schulz herbs at wideopenwest.com
Tue Feb 15 20:24:07 CET 2005

On 2/15/05 11:41 AM, "Peter S. Burrage" <peter.s.burrage at Dartmouth.EDU>

> I'm sure I'm making some silly mistake but when I use SIunits and
> \celsius I lose the space between ^oC and the following word.  In
> addition, I don't see any space at all (small or otherwise) between the
> final numeral and the degree symbol.
> For instance:
> at 37$^\circ\mathrm{C}$ and 5\% CO$_{2}$  -->  at 37oC and 5% CO2
> but
> at 37\celsius and 5\% CO$_{2}$  -->  at 37oCand 5% CO2
> can anyone point me in the right direction?
> Thanks!
> Pete


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.

Good Luck,

Herb Schulz
(herbs at wideopenwest.com)

--------------------- 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