7

When I write scientific content that uses measurement units I usually refers to the following guidelines for the typesetting:

Summarizing:

  • There should be a space between the numeric value and the measurements unit
  • No Italic, the symbols for units and SI prefixes are roman
  • A dot is sometimes used to separate the units symbols multiplied

But I am not sure what is the best way to transform these guidelines into LaTeX code. So far I've been using a code like this:

3.98~\mathrm{m \cdot kg \cdot s^{-3} \cdot A^{-1}}

That leads to:

enter image description here

Is this the best way to express unit measurements in publications?

  • 2
    Read siunitx documentation. It's pretty flexible. If you want the dot, just add \sisetup{inter-unit-product = \ensuremath{{}\cdot{}}}. – Manuel Aug 22 '16 at 13:42
16

In my opinion the best way to typeset (SI-)units is the siunitx package by Joseph Wright. It is very elaborate and lets you customize the behaviour of the display command \SI{value}{unit} – please read the documentation…there are way to many features in this awesome package to explain everything in full detail in one post.

Your example would 'translate' to

\SI{2.98}{\meter\kilogram\per\cubic\second\per\ampere}

Simple and beautiful…

  • 2
    @GM You can configure it to do so, see section 5.12 of the manual. And NIST says "A space or half-high dot is used to signify the multiplication of units". (emphasis mine) – Torbjørn T. Aug 22 '16 at 13:40
  • 1
    What do you mean by 'dot notation'? The \cdot command you used to seperate the units? Of cours siunitx does support that! Just use \si[inter-unit-product = \ensuremath{{}\cdot{}}] {3.98}{\meter\kilogram\per\cubic\second\per\ampere} or set the option globally – Fabian A. Aug 22 '16 at 13:43
  • 2
    @FabianA. \SI[<options>]{<value>}{<unit>}. The lowercase version (\si[<options>]{<unit>}) is for typesetting only a unit, without a value. – Torbjørn T. Aug 22 '16 at 13:48
  • 2
    Note the unit is called 'metre' not 'meter': the latter is allowed by the package – Joseph Wright Aug 22 '16 at 17:00
  • 1
    @JosephWright are you sure of what are you talking about? Are you familiar with the package? ;-) – G M Aug 22 '16 at 17:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.