Questions tagged [siunitx]

{siunitx} is a package that provides consistent typesetting of physical quantities, allowing application of various typographic conventions with the same input syntax. This package replaces the deprecated {siunits} package.

Filter by
Sorted by
Tagged with
0
votes
0answers
10 views

Induce line break between number and unit in siunitx in cases latex does not do it autmatically

I have a question related to this one: How to line break a siunitx unit. In my case I have paragraphs where even with allow-number-unit-breaks=true no break happens in some cases (see example below). ...
3
votes
1answer
17 views

Incompatibility of packages ucs, CJKutf8, siunitx

I am using pdftex to write a book that mixes mathematics, Chinese and transliterated Arabic. The following setup \documentclass{article} \usepackage{ucs} \usepackage{CJKutf8} \usepackage{siunitx} \...
5
votes
3answers
53 views

SIunitx error when using lighter weight

Using the SIunitx package with montserrat package doesn't produce the desired result: \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[defaultfam,light,scale=0....
2
votes
1answer
23 views

Dashed lines and point-aligned numbers in a column?

How can I have these two features at the same time in a table: dashed lines, and numbers aligned on their decimal points? MWE (except it doesn't work): \documentclass[12pt,a4paper]{article} \...
5
votes
3answers
246 views

Automatically convert a number to use the correct SI unit prefix

Say one is talking about numbers 10^6, 10^7, 10^8, 10^9 and so forth one can also write them as 1M, 10M, 100M,1G, with their corresponding SI unit prefixes. Is there a way to convert a number on the ...
1
vote
1answer
74 views

siunitx: enclose all units in brackets

when I use the command \SI{1}{\kilo\gram} I'd like it to output 1 [kg] Is there a setting so that SIUnitx automatically does this for all units in a document?
4
votes
2answers
48 views

Avoid bfseries from bolding \pm in siunitx

I'm using siunitx to successfully align my column content along the \pm: \begin{table}[b] \centering \robustify\bfseries \begin{tabular}{ c S[detect-weight, table-...
2
votes
1answer
23 views

siunitx nested “per” symbols

I am attempting to type the following using siunitx: K/(W/m) which is how this quantity is commonly written in my field. I was hoping \si{\kelvin\per\watt\per\meter} would do it, but that doesn't ...
5
votes
2answers
271 views

Undocumented incompatibility between changes and siunitx? [duplicate]

I am currently using the changes package to track some modifications in a document, along with the siunitx package for number formatting. Whenever I try to have a \SI{}{} call iside a \replaced{}{} ...
7
votes
3answers
270 views

siunitx error: Invalid numerical input

I use siunitx package to display intervals in tabular, according to this answer. But I use parenthesis instead of square bracket. This is a MWE: %!TeX program = xelatex %!TeX encoding = UTF-8 \...
3
votes
1answer
57 views

Siunitx table, with a number in parentheses (single row)

I want a table column to be aligned using the thousands comma. But when I try to put a number in parentheses I get an error. I have read previous answers which were not suitable for my situation, ...
0
votes
0answers
36 views

siunitx spacing between 10 and exponent

I am using siunitx to format numbers in tables and text, both with and without units. Functionality is great, but I when displaying a number with "times 10 to the power of x" format, I find the ...
4
votes
1answer
42 views

“Unknown slot number of character” with microtype and siunitx

This MWE produces the following warnings: \documentclass{article} \usepackage{microtype} \usepackage[detect-all]{siunitx} \begin{document} \num{1e-3} \end{document} I receive 5 warnings similar ...
0
votes
0answers
33 views

Double dashed underline

In accounting reports it is customary to use double underlines, and double dashed underlines. Is there a simple way to do so without using Tikz? I prefer something that can work with Siunitx table ...
1
vote
1answer
44 views

Underline a number in an siunitx table (in beamer)

I want a table column to be aligned using the thousands comma. But when I try to underline the number it moves and the comma disappears. MWE: [![\documentclass\[t,xcolor=table\]{beamer} \usepackage\[...
1
vote
1answer
22 views

Avoid repeating \num / other command in xticklabels

I have created the following image which I am quite happy with I had to scale down the functions as I kept running into overflow errors. I am mostly happy with the code except for the ...
0
votes
1answer
61 views

How to put a positive sign with thermodynamics module

I want to put a positive sign "+" in front of a positive number with units in thermodynamics module of chemmacros. So I made the following LaTeX cord related to this with tuning siunitx: \usepackage{...
0
votes
0answers
35 views

Align values in a table to decimal point when using “p” columns

I have a LaTeX table that looks like this: I want my decimal points to line up. I know I can use \usepackage{siunitx} for this, and a bit of Googling revealed that if I use "S" columns, I can align ...
0
votes
0answers
17 views

Line break siunitx product numbers [duplicate]

Pretty much the same question as enter link description here The answer is from 2014 and says an update then would fix this, but I can't find anything related to this. Does anyone know if an update ...
2
votes
1answer
58 views

Recurring decimal within an aligned array

I am having some issues with representing recurring decimals (using \overline{}) within an aligned array I am using to represent a matrix. \documentclass{article} \usepackage{gensymb} \usepackage{...
2
votes
1answer
43 views

Italicizing Variables in SI unit commands [duplicate]

As many other answers have elucidated, the correct way to typeset SI units is with the SI command from siunitx. However, if the value being described is a variable (for example, x metres), doing $\SI[...
2
votes
2answers
53 views

! Package array Error: Illegal pream-token (s): `c' used as well as No output of units using siunitx

I am trying to create a table using tabular environment. However I am getting two errors. The first error is the one where there is an illegal pream-token (s): `c' used. The second problem is that I ...
2
votes
1answer
37 views

siunitx \num giving thousands space for 5 digits but not for 4 digits

I have a table with numbers that are right aligned. I changed them to use \num{} to try and improve the output. But it seems that \num{} adds a thousands separator space for 5 digit numbers but not ...
3
votes
2answers
77 views

Set command option with document wide newcommand

I work a lot with the siunitx package and I've got many numbers with a high decimal precision. Now I'd like to be able to just copy these numbers in full precision in the relevant positions in text, ...
4
votes
2answers
76 views

Problems with numbers (result of calculations) alignment using siunitx package inside tabular environment

I'm having some problems when try align numbers, results from calculations, using siunitx package. That is my code. \documentclass{article} \usepackage{siunitx} \usepackage{fp} \usepackage{booktabs} ...
3
votes
2answers
96 views

How to get `siunitx` to accept complex numbers in polar format?

siunitx accepts complex numbers given in rectangular format. In LaTeX, a polar complex number can be written as <number>\angle<angle value>^{<degree symbol>}, but siunitx does not ...
1
vote
0answers
128 views

Undefined control sequence when running siunitx

Good morning, when I try to load the siunitx package, TeX Studio reports undefined control sequence and missing \begin{document}. The error can be replicated by compiling this piece of code: \...
2
votes
1answer
39 views

How to typeset a number like 10.10.10 with the siunitx package?

I want to list the versions of some python modules I am using. The problem is that the format of the version has two dots, for example 10.10.10 or 1.04.5. When I try \num{10.10.10} I get the error: ...
6
votes
3answers
138 views

Align column where each cell has two decimals with siunitx

I also want to align the second column. The problem is, that there can't be two numbers in one cell Is there a way to align the second column via digits even if there are more decimals? I also used ...
2
votes
3answers
132 views

Help Recreating a Table

I am trying to recreate this table using LaTeX. I want to additionally align the decimals. I have tried using this code to do so. \begin{frame} \frametitle{Table} \begin{table} \begin{tabular}{l *{4}...
1
vote
1answer
38 views

Centre column head with siunitx

Consider this example \documentclass{report} \usepackage{siunitx} \begin{document} \begin{tabular}{l S} A & {sf}\\ 0 & 9887779.1\\ 0 & 9999.1 \\ \end{tabular} \end{document} In ...
0
votes
0answers
38 views

Adjust column with siunitx

In this example \documentclass{report} \usepackage{siunitx} \begin{document} \begin{tabular}{l S[table-format=12.1]} A & {sf}\\ 0 & 9887779.1\\ 0 & 9999.1 \\ ...
3
votes
2answers
103 views

How to write non-numerical content into an S-type column from siunitx package?

What is wrong with this table? I think there is something wrong with $\si{\degree}$. \documentclass[a4paper]{article} \usepackage{amsmath, amsthm, amssymb, mathtools} \usepackage{siunitx} \begin{...
0
votes
0answers
34 views

Evaluate/round a mathematical expression using \input

I want to evaluate a mathematical expression using a number from a different latex document. In this case, number.tex consists of a single number (e.g., 40) that has been exported from a statistical ...
1
vote
0answers
31 views

siunitx number too big when trying to round with round-half = even

I was trying to round numbers with siunitx and got the following error: Number too big \num{0.125555555555} The problem occured when I changed the round-half parameter to even. \documentclass{...
1
vote
1answer
46 views

How to put siunitx units in a parenthesis or an equation?

I want to put units in an equation. Someone published a paper with units written that way. I need to mimic that. A simple case would be: \begin{equation} a = \si{\ell}{(\cm)} \end{equation} or \...
3
votes
1answer
93 views

How to add zeros to reach same number of decimal places in tables?

\documentclass{article} \usepackage[locale=FR]{siunitx} \usepackage{booktabs} \usepackage{geometry} \begin{document} \begin{table} \centering \begin{tabular}{lS[table-format=4.6]S[table-format=...
0
votes
0answers
126 views

usepackage{siunitx} produces error - texstudio

Im using TexStudio in UTF8. the following codes \documentclass{article} \usepackage{siunitx} \begin{document} \num{0.12368455} \num[round-mode=places,round-precision=4]{0.12368455} \end{...
0
votes
0answers
24 views

Change the style of decimal point in siunitx [duplicate]

Consider this example: \documentclass{article} ...
2
votes
1answer
44 views

Enabling `exponent-to-prefix` functionality for unitless values

With siunitx package, exponent-to-prefix option seems to work only if there is a unit with the given number (\SI, \SIrange, and \SIlist). I want the option to work even with unitless values (given by \...
2
votes
1answer
60 views

Fixed column width and align on decimal with siunitx

I have the following Latex table I generated with the KableExtra package in R. What I want to do now is make all columns the same/fixed width and align on decimals. The second of these is not to be ...
2
votes
1answer
59 views

Placeholder number with siunitx

I would like to add a placeholder number in my text, to remind me that I still have to look it up, later. I usually just use something like "XYZ" or "???" for this. But when I'm using the \SI notation ...
0
votes
0answers
53 views

siunitx uncertainty values with different number of decimal places and scientific notation

I'm using the siunitx package to typeset number in a table. Because some of the number have an uncertainty value of 1 or 2 I want more decimal places in the uncertainty value than in the number itself,...
1
vote
1answer
51 views

Problem with siunitx package together with rmstyle.cls

could somebody point out what to change in rmstyle.cls file to get siunitx working? Here is the MWE: \documentclass{rmstyle}[12pt] % \documentclass{article}[12pt] \usepackage{siunitx} \setcounter{...
0
votes
0answers
31 views

Setting \SIrange and units in parentheses

I need to set a range with units in parentheses, nevertheless once I use \SIrange I can't set the left and right parenthesis as used in a normal text. I tried with \SIrange[range-units = brackets]{2}{...
0
votes
1answer
77 views

siunitx—how do I get exponents with uncertainties?

I am typesetting a lab report with indirectly-measured values of a diffraction grating's grating spacing; these values are on the orders of micrometres, which are more easily expressed in scientific ...
4
votes
1answer
215 views

How to write values with uncertainty and units with brackets: (339+-14) m/s

This code \documentclass[a4paper]{article} \usepackage[separate-uncertainty=true,multi-part-units=single,list-units=repeat]{siunitx} \begin{document} \[\SI{339\pm14}{\meter\per\second}\] \end{...
2
votes
3answers
40 views

Aligning digits in table with percentage sign on first row

I'd like to align the digits taking into account the percent symbols on the first row. MWE: \documentclass{article} \usepackage{booktabs} \begin{document} \begin{table} \centering \...
0
votes
0answers
53 views

problem given by decimal alignment in latex tabu table with bold numbers

I'd like to have a table aligned by decimal point. I'm using tabu instead of table for exploit rowfont because I need row with smaller character. I've read different posts on dcolumn and siunitx ...
6
votes
2answers
171 views

Maths symbols and unicode-math input inside siunitx commands

What I’m trying to do is to input Unicode characters directly inside siunitx commands, like \SIrange{≳9}{≈40}{\kilogram}. But it does not work and I get errors like ! Package siunitx Error: Invalid ...