# [texhax] units

W. J. Metzger wes at hef.kun.nl
Fri Jun 13 16:41:06 CEST 2003

On Fri, 13 Jun 2003, Philip G. Ratcliffe wrote:

> > > > > 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.
>
> Well, unsightly is perhaps a little extreme.  In any case, it's actually no
> different if you just write eV in standard text (apart that is from an
> obvious font difference - which incidently also shows that one should be
> consistent in using, e.g., $1.6\,$eV and  $1.6\,\mathrm{eV}$).  So, it isn't
> surprising that the package doesn't intrinsically do it.  That said, it's
> easy enough to redefine \electronvolt with the correct kerning.  For what
> it's worth I define an extended set including \GeV, \MeV etc. in a local
> SIunits.cfg file.

Well, sure.  I too have such definitions.  But if I have to define
everything myself, I don't need the package.

>
> > > > Further, it does not handle spacing.  One would like 5\meter  and
> > > > 5 \meter to produce the same thing.
>
> There's no way (that I know of but Robin may correct me on this) in TeX to
> make, e.g., \meter look BACK to the previous text and space itself
> correctly.  However, the package is INTENDED to be used in the following
> way: \unit{1.6}{\giga\electronvolt\squared}.  And that DOES get the spacing
> right.  Indeed, via the package options, one can even choose the spacing to
> use, differentiating, moreover, the spacing between numbers and units, as in
> 1.6 GeV, and between units themselves, as in 197 MeV fm.

OK,  I had not realized you had to use \unit to get the spacing right.

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