[texhax] units

W. J. Metzger wes at hef.kun.nl
Fri Jun 13 13:19:39 CEST 2003

On Fri, 13 Jun 2003, Philip G. Ratcliffe wrote:
> > >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.
Well, I am underimpressed.
Try \electronvolt.  The V really should be negatively kerned -- the space
between the e and the V is unsightly large.
Try \square\giga\electronvolt.  The square is applied to the G not to the
V, i.e., you get G^2eV rather than GeV^2.  To get it right you need to use
\giga\square\electronvolt, which does not read normally. What you would
say is giga-electronvolt-squared.
Further, it does not handle spacing.  One would like 5\meter  and
5 \meter to produce the same thing.
> 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
Cheers, Wes
Dr. W. J. Metzger            Experimental High Energy Physics Group
tel. +31-24-3653127          Faculty of Natural Sciences
     +31-24-3652099 (secr.)  University of Nijmegen
fax. +31-24-3652191          Toernooiveld 1
telex 48228 wina nl          6525 ED  Nijmegen,  The Netherlands
e-mail:  wes at hef.kun.nl      or   W.Metzger at cern.ch
http://home.cern.ch/metzger/ or   http://www.hef.kun.nl/~wes

More information about the texhax mailing list