Featured Post

We've moved to tex.my!

It’s been great writing on Blogger.com, but we’ve decided to move to a new platform, thanks to some valuable help from a great, great friend...

Monday, June 20, 2011

Typesetting SI Units

Most people would already have heard of the siunitx package, but in case you haven’t, here’s a small, humble request:

<rant>
Please use the siunitx package more to typeset your measurements. Please. I beg you. It’s so much easier and makes things look so much more professional.
</rant>
(Yes, this is going to be a rather ranty post, but don’t worry, I’ll keep it short.)

I mean, just compare the output when using siunitx:

\usepackage{siunitx}
\SI{3.563d4}{\square\volt\cubic\lumen\per\farad}


And doing it manually:

$3.563 \times 10^4$ V$^2$ lm$^3$ F$^{-1}$


I rest my case. And if you’re not convinced yet, you can also do lists and ranges of values like this:

\SIlist[per-mode=symbol]{40;85;103}{\kilo\metre\per\hour}
\SIrange{75}{110}{\kilo\pascal}



So please. Start using siunitx.

4 comments:

  1. Actually it's not a right way to do it manually, when i write something like
    $3.563 \times 10^4 \, \text{V}^2\;\text{lm}^3\;\text{F}^{-1} $
    it's looks nice.

    So, using siunitx or siunits ir much easier but not necesarry.

    ReplyDelete
  2. @krāsulauva Thanks for your comment. I was too lazy to figure out the right spacing -- bad of me.

    ReplyDelete
  3. is posible to change the language? In your example is 75KPa to 110 kPa, wich is wright in english but in spanish it should be 75kPa a 110kPa (the change of to --> a)
    Thanks Jorge

    ReplyDelete
  4. Apparently Spanish is still not supported! It's possible to localise the phrases for German and French, like this:

    \documentclass[ngerman]{article}
    \usepackage{babel}
    \usepackage{siunitx}
    ...
    \SIrange{75}{110}{\kilo\pascal}

    But not yet for Spanish. :( You'll have to create a dictionary for the translator package; see the section about Localisation in the siunitx manual, and the "translator" package documentation.

    ReplyDelete