Math & Science ⇒ Using SI units
-
- Posts: 120
- Joined: Fri Nov 14, 2008 9:40 pm
Using SI units
I have seen some packages for the writing of the SI (Système International) units in documents. I often write documents about Physics, so I have to use these units, but I simply wonder if it is important to use these packages or not. I also want to know how do the physicists, about this.
Thanks!
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Using SI units
Code: Select all
2 \cdot 10^{-3}\,\textup{kg}
Code: Select all
2*10^{-3} kg
Code: Select all
\SI{2e-3}{kg}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Using SI units
As a physicist, I feel directly addressed with this request. I also write lots of physical (and chemical) formulas. Not aware of any package, I started with formatting mathematical expressions containing units on my own. Since this can become very confused, I appreciate packages that save me a lot of time in typesetting this. I started with the simply structured units package and currently I'm using siunitx. The advantage of such packages is that they control things like text shape and spaces within the units and often simplify the input of number formats. You can rely on the fact that those packages typeset units as demanded.latexforever wrote:[...] I have seen some packages for the writing of the SI (Système International) units in documents. I often write documents about Physics, so I have to use these units, but I simply wonder if it is important to use these packages or not. I also want to know how do the physicists, about this. [...]
Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 120
- Joined: Fri Nov 14, 2008 9:40 pm
Using SI units
-
- Site Moderator
- Posts: 814
- Joined: Tue Jul 01, 2008 2:19 pm
Re: Using SI units
--
Joseph Wright
-
- Posts: 120
- Joined: Fri Nov 14, 2008 9:40 pm
Using SI units
Code: Select all
\num
Code: Select all
decimalsymbol=comma
Code: Select all
\usepackage[allowzeroexp=true,numdigits,obeymode=true,redefsymbols,textcelsius,textdegree,textminute,textmu,load={abbr,addn},decimalsymbol=comma]{siunitx}
But when I use:
Code: Select all
Calorie & $\cal$ & $\num{4,186}\SI{}{J}$\\
Invalid character `4,186' in numerical input. It is the same thing when I use a dot at the place of the comma. What's the matter? Thanks!
Re: Using SI units
-
- Posts: 120
- Joined: Fri Nov 14, 2008 9:40 pm
Using SI units
The problem is not only present in tabular environments. Even when I writephi wrote:What is the column type in your example? For guidelines about how to use siunitx for setting tabular material, please read sections 5 and 20.5 of the documentation.
Code: Select all
$\num{4,186}\SI{}{J}$
Code: Select all
\SI{}{J}$
Using SI units
Anyway, I recommend that you reread the siunitx documentation. A code like
Code: Select all
$\num{4,186}\SI{}{J}$
Code: Select all
\SI{4,186}{J}
Code: Select all
\SI{4,186}{\joule}
-
- Posts: 120
- Joined: Fri Nov 14, 2008 9:40 pm
Re: Using SI units
In fact, I used dollars to test something. I was sure I hadn't understood something in the documentation of this package. I don't know why this wasn't clear to me.
Your explanations are clear, and I have understood. Anyway, I'll read a second time the package's documentation.
Thanks for your message.