{siunitx} is a package that provides consistent typesetting of physical quantities, allowing application of various typographic conventions with the same input syntax. This package should be used instead of the largely obsolete {siunits} package.
38
votes
5answers
931 views
Why use a package to typeset units?
I've seen a lot of posts about different packages for typesetting units and their relative strengths and weaknesses. Most posts seem to agree that the siunitx package is the most up to date package, ...
38
votes
1answer
6k views
Aligning numbers by decimal points in table columns
Let me begin by stating that I did google the answers (and I'll reference to them soon). Yet each of the resources I found discussed one particular method, I'm interested in a comparison of the ...
21
votes
1answer
358 views
microtype + siunitx and \micro - mysterious warnings
This code
\documentclass{scrreprt}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{microtype}
\usepackage{siunitx}
\begin{document}
\SI{10}{\micro\metre}
\end{document}
produces these ...
19
votes
1answer
518 views
“Pretty-printing” numbers redux: engineering notation
Awhile ago I discovered the siunitx package as an answer to this question and it kind of blew my mind. For instance, if I'm using fp to compute a numerical result (in, say, a homework solution), then ...
18
votes
2answers
4k views
Differences between SIunits and siunitx packages
I was reviewing What packages do people load by default in LaTeX?, and noticed that the siunitx package was recommended. I have been using ...
16
votes
3answers
2k views
Should I put a space between a number and its unit?
No too much more to say.
\( 2.63\si\ohm \) looks odd. But it might be the correct way.
\( 2.64\,\si\ohm \) looks much better IMO. What about the \,? Sould it be bigger, smaller or there is no really ...
16
votes
1answer
235 views
Consistant formatting with siunitx and pgf: Thousands Separator
I like the default behavior of the siunitx package in that the thousands separator is not applied to four digit numbers, but is applied when the number of digits exceeds four. In documents that ...
12
votes
1answer
325 views
How to set the precision in numbers
I include the number as \num{0.12368455}. I need to print '0.1237'.
How to do this...
12
votes
2answers
1k views
Automatic thousands separators?
I want to typeset big numbers with a separator (e.g a space or a ",") between hundreds and thousands, etc... For example 1 Million = 1 000 000.
I know the package siunitx which does it very well, but ...
12
votes
1answer
254 views
Why has m/s changed in siunitx package?
I would have expected \meter\per\second to generate an output m/s. But when using the package siunitx the output is similar to ms^-1. I referred the documentation for the package and there too the ...
12
votes
1answer
102 views
siunitx not using kerning units correctly ahead of a sentence-ending dot (period, full stop)
If the unit is the final character in a sentence, the sentence-ending dot is not kerned correctly.
MWE:
\documentclass{article}
\usepackage{siunitx}
\usepackage{mathpazo}
\begin{document}
...
12
votes
1answer
174 views
Align numbers and separated uncertainties in tables with S columns
If I have a table like this
\documentclass{article}
\usepackage{booktabs}
\usepackage[separate-uncertainty=true]{siunitx}
\begin{document}
\begin{table}
\centering
\begin{tabular}{
...
12
votes
1answer
473 views
Why do some fonts used by siunitx and textcomp look rasterized?
For example, the mu in \SI{1.55}{\micro\metre} looks really bad for some reason.
For textcomp, \textmu looks the same.
11
votes
1answer
188 views
alignment of table numbers
why the numbers indicated from the arrows are not aligned compared to the columns above ?
\documentclass[border=10.0mm]{standalone}
\usepackage{booktabs,caption}
\usepackage{siunitx}
\sisetup{%
...
11
votes
1answer
104 views
Unwanted behaviour of siunitx
Consider the following example.
Code
\documentclass{article}
\usepackage[per-mode=symbol-or-fraction]{siunitx}
\begin{document}
\[ \frac{x}{\SI{4}{\m\per\degree}} \]
\end{document}
Output
...
11
votes
1answer
222 views
Aligning text in S columns in a way that respects the decimal marker for numerical entries
As I understand it, using various options for the S column in siunitx, I may produce columns containing both numerical and nonnumerical entries. I may have the numerical entries aligned at their ...
11
votes
2answers
199 views
Adjust the exponent to switch between notations using siunitx
I have a big question about the siunitx package and I hope somebody out there can help me.
At first I want to use the automatic number conversion of the package. So I defined:
...
11
votes
3answers
160 views
Angular frequency in siunitx
When using siunitx, is there an intuitive way to type angular frequencies with the prefix 2\pi \times? The provided example
\documentclass{article}
\usepackage{siunitx}
\begin{document}
\SI{2\pi x ...
10
votes
1answer
445 views
The siunitx package messes with manually input thousand-separators
Recently I found the very useful siunitx package, and immediately looked to use it for some tables. Unfortunately, I already have all my numbers typeset with , thousand separator and . decimal ...
10
votes
1answer
494 views
SI units for sheet resistance using siunitx
I'm trying to get the package siunitx to output the units for sheet resistance (Ohm per square), with the square as a square box. My current solution (in text mode) is:
30-60 $\Omega/\square$
...
10
votes
1answer
163 views
Getting \bm to pass thru siunitx macros
It seems that macros form the \siunitx package have a \bm problem, but no problem with \textcolor:
Note that the 180 passed thru the \ang macro is not bold.
So, how do I change the \MyFormat macro ...
10
votes
1answer
157 views
Scientific Notation Only For Large Numbers
I have a table full of numbers. Most of them are floating point numbers that are less than one, some are integers from 1-100, and a few are large (×10^75). I know how to set the precision of the ...
10
votes
1answer
604 views
Make pgfplots typeset axis units as reciprocals using siunitx
pgfplots has a library units that allows to typeset units in axis labels provided through x unit=<unit>. Through the key \pgfplotsset{unit code/.code={\si{#1}}}, it can be made to typeset the ...
10
votes
1answer
141 views
Siunitx and cancel package
I want to symbolically cancel out units using the siunitx package. To do so I tried the cancel package as in the following minimal example:
\documentclass{article}
\usepackage{amsmath}
...
10
votes
1answer
667 views
Having problems aligning in a table with siunitx when using uncertainties in some power of 10
I'm trying to have a table, with an S column (from the siunitx-package) where the numbers are aligned to the \pm signifying uncertainty. Some values have uncertainties like 1.00 x 10⁴ and that seems ...
9
votes
2answers
108 views
Why do the standard siunitx settings not detect font weight?
Using KOMA-script I got a bold font for chapter/section titles. I had a unit, \SI{1}{\something}, in one of them which was not set in bold font. Giving siunitx the following options
...
9
votes
2answers
102 views
ascii and siunitx packages collide
I want to load both the ascii package and the siunitx package. The problem is that both define a symbol \SI. Is there any way to make both packages work together?
9
votes
3answers
328 views
mathpazo + siunitx: π turns into ß
When I use mathpazo and siunitx (version 2.3h) together, if I use \pi inside the numerical argument to \SI, it will show up in the output as "ß".
\documentclass{article}
\usepackage{mathpazo, ...
9
votes
1answer
172 views
How to typeset dimensions of a box?
I want to typeset something like this: 3.0 × 3.0 × 0.9 mm
How can I do that in LaTeX (using siunitx package)?
So far, I have this:
\num{3.0} × \num{3.0} × \SI{0.9}{\milli\metre}
But probably ...
9
votes
3answers
136 views
Aligning complex numbers in centre of table with siunitx
I'm trying to align complex numbers in the middle of a table column using the siunitx package for nicer alignment, but the numbers are centring based on where the decimal point would be on the real ...
9
votes
3answers
956 views
How to use siunitx and tabularx together?
I'm using the tabular features of siunitx (for what it is worth: v1.3 since I'm on TexLive 2009) to align numbers in tables, eg.
\begin{tabular}{ p{1.5cm} S S S }
bla & 1.23 & 4.5 & 67.89 ...
9
votes
1answer
79 views
siunitx and engineering 'E' notation
Is it possible to use the siunitx package to typeset numbers with the "E" notation so that the output might look like
1E3
instead of
1 x 10^3
9
votes
1answer
165 views
Store results of a calculation automatically under a new macro name
As I am now accessing values from tables via a macro to make dynamic references in the text (see here) and make calculations with it, I need a way to make the resulting variables under which the ...
8
votes
3answers
161 views
Why is there extra whitespace to the left of this standalone document when using siunitx?
I'm using the standalone document class. Here is a minimal working example:
\documentclass{standalone}
\usepackage[siunitx]{circuitikz}
\begin{document}
Hello world
\end{document}
The problem ...
8
votes
5answers
550 views
How to use siunitx with non numerical values?
I understand that something like \SI{5}{\meter\per\second} defines a certain space between the number (5) and units (m/s). What should I use if instead of a numerical quantity I want a variable: R ...
8
votes
2answers
5k views
Numbers in tables: align by decimal point *and* flush right?
This is a followup question to siunitx: aligning numbers by decimal points in tables doesn't work for bolded or italicized numbers
and Aligning numbers by decimal points in table columns.
While ...
8
votes
2answers
458 views
How to use siunitx to write 100 MBps?
I want to show 100 MBps (one hundred mega byte per second) in my article. How to make use of siunitx package to produce the rate correctly?
The following outputs are not what I want to get.
8
votes
2answers
396 views
Properly align numbers with units in table
I need to typeset a table comparing, among other things, the temporal resolution of certain datasets. Ordinarily, I would put the common unit into the table header, and only list the values in the ...
8
votes
2answers
393 views
siunitx: How do I unset options previously set with \sisetup?
In the siunitx package (v1.3), I know that I can set various options with the \sisetup command. But what if I want a particular option to apply to only a small section of my document, with default ...
8
votes
2answers
1k views
siunitx: aligning numbers by decimal points in tables doesn't work for bolded or italicized numbers
This is a follow-up question for Aligning numbers by decimal points in table columns.
User lockstep provided this solution:
\usepackage{siunitx}
\begin{document}
\begin{tabular}{S[table-format=3.2]}
...
8
votes
1answer
481 views
How to denote the standard deviation with siunitx?
I'm certain that I saw a command generating the following kind of output the last time I read through the siunitx manual:
\left( 12.3 \pm 0.4 \right) V
for a measured voltage of 12.3 V and a ...
8
votes
1answer
1k views
Comma as decimal marker with siunitx (Spanish usage)
I'm using siunitx to input some big numbers and units in my document.
Is there a way to make the output of \num{3.14} be "3,13" instead of "3.13"? In Spanish, we use the first one.
8
votes
1answer
325 views
siunitx: Bold single numeric cells
I'm struggling to make a single numeric cell in an siunitx table bold. (A similar question for making a whole column bold is available here.)
I want to define a simple macro which I can set for the ...
8
votes
2answers
397 views
\per\kWh produces a wrong output
I want to say 10 cent dollar per kilowatt-hour of electricity. When I compile the following,
\documentclass{article}
\usepackage{siunitx}
\begin{document}
\SI[per-mode=symbol]{0.1}[\$]{\per\kWh}
...
8
votes
2answers
637 views
How to use SIrange in math mode
I cannot figure out which of the siunitx font options is the correct to typset the rangephrase when using SIrange in math mode the same way as in text mode. See the MWE
\documentclass{book}
...
8
votes
1answer
198 views
How to round to units of thousands or millions, etc., in a table column?
I have a table with lots of raw numbers in the billions and hundreds of millions. I'd like to abbreviate the figures in these columns to millions. So instead of 234,091,123 as per the input, I'd like ...
8
votes
1answer
157 views
siunitx rounding works only if centering
Using the siunitx package
\usepackage{siunitx}
Consider the following two tables:
1.
\begin{tabular}{
S[table-number-alignment=center, table-figures-decimal=3, table-auto-round]
}
3.23958398 ...
8
votes
1answer
133 views
pgfplots - x unit with siunitx
I want to use x unit=something to draw the units to an axis. In the manual I find this to use siunitx to do so:
\pgfplotsset{
unit code/.code 2 args={\si{#1#2}}
}
Now I make a plot:
...
8
votes
1answer
656 views
How to use lining figures in siunitx and fontspec?
I'm using XeTeX and fontspec, and I have selected old-style figures for my body text. Now I use the siunitx package, and have set it up to use text fonts instead of math fonts. For the siunitx values ...
8
votes
2answers
250 views
Chemical purity and siunitx clash when putting a “+” after percentage
I'm using siunitx to describe some chemical purities. The purity I would like to describe is sold by the chemical company as 99.9+ % (not the best way of describing it I'm sure). When I try to ...



