7

My question is about possible advantages of writing

$\mbox{\textit{Re}}=\SI{0.137}{}$

instead of

$\mbox{\textit{Re}}=0.137$

Is there any?

  • 2
    you don't need \mbox in either case you could just use \textit or better, \mathit – David Carlisle Sep 28 '14 at 10:06
  • 3
    For this purpose, siunitx has \num{<number>} macro so you don't need to skip the unit. – percusse Sep 28 '14 at 10:06
  • 1
    You should not be using \SI if you just want a number: they are semantically different. – Joseph Wright Sep 28 '14 at 10:20
  • 1
    @Andrestand, you can load the package with the decimalsymbol option, if you are writting in spanish and you don't want to use the international format. Just load \usepackage[decimalsymbol=comma]{siunitx} – U.Martinez-Corral Sep 28 '14 at 16:28
  • 1
    @U.Martinez-Corral, thanks, although I use in fact point, despite Spanish babel for some reason switches it to comma. – Andrestand Sep 29 '14 at 7:19
11

The \num command is provided primarily to allow consistent number formatting with the first argument to \SI. Thus whether you want to use \num is primarily about whether you need that consistent formatting. For example, \num will do things like turn , into . (as standard) to produce normal scientific output even if the input is localised. It will also turn 1.2e3 into 1.2 \times 10^{3} and so forth.

Of course, if you choose to turn off the number parser in siunitx then the format of numbers is the same between $1.23$ and \num{1.23}. (Indeed, while people mainly ask about number formatting the real core point of siunitx is not that but the idea of consistent application of units.)

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.