Latex and SI-Units

Everybody knows the Problem: You are writing a formula, calculate something and then you end up with numbers – and some weird units. What to do? Until now, I always started something like
\frac{\mathrm{kg}*\mathrm{m}}{\mathrm{s}^2}. Thanks a lot! But today, I stumpled over the siunitx package. This makes it easier for you to attach units to numbers – both in text- and mathmode. The above SI-Unit would look like this:
\si{\kilo\gram\metre\per\square\second}
Or, if you prefer it shorter:
\si{kg.m/s^2}
You can even define your own units in the preamble:
\DeclareSIUnit{\koeartsforce}{\kilo\gram\metre\per\square\second}
Now I can write, that
The Monty Pythons' famous 16 Tons weight will smash you to the ground with a force of approx. \SI{156960.0}{\koeartsforce} - assumed you are standing on the surface of planet earth..

(Sorry Newton, I know this unit was actually dedicated to you!).

So, if you like doing things right go and check it out! You can find (german) introductory slides by suedraum.de at http://www.suedraum.de/latex/stammtisch/werte_und_einheiten_siunitx_2.pdf (they have other cool LaTeX stuff, check it out!), siunitx on ctan.org and – last but not least, on your local system:
texdoc siunitx.

If you have a tip on how to enable auto-discovery of SI-Units – I would be thankful for that as well!

Hinterlasse einen Kommentar

Eingeordnet unter diverses, news

Schreibe einen Kommentar

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden / Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s