[texhax] units

Philip G. Ratcliffe philipratcliffe at tiscali.it
Fri Jun 13 11:36:05 CEST 2003

> >Hi All, I need some help on using physical units like g/cm^3.
> >I am using the \,cm but it dosen't work for cm^3. Any body can help?
> >
> ^ works in math mode (between $ signs), so $x=20cm^3$ will work, but
> "cm" will be in italic type, while units should be roman (am I right?).
> I don't know if this is the right way to do it, but e.g. $x=20$cm$^3$
> would work, however probably $x=20{\rm cm}^3$ or $x=20\hbox{cm}^3$ would
> be better.

Better still is $x=20\,\mathrm{cm}^3$.

> Should there be any space between the number and a unit?

Yes, there should.

A very simple package is "units", which you can find on CTAN.

For a more complete handling of units with correct spacing, compounding
etc., check out the "SIunits" package, also on CTAN.

Suggestion:  you can almost always find what you need by taking a look at
the CTAN catalogue (depending on yout TeX installation, you may even have it
in on your hard disk), or by googling a suitable combination of keywords
(for instance -latex "typeset physical units"- finds SIunits immediately).

Cheers,  Phil

More information about the texhax mailing list