summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/siunitx/siunitx.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-01-04 03:02:24 +0000
committerNorbert Preining <norbert@preining.info>2023-01-04 03:02:24 +0000
commitb2ede2da5ece936a9be421f2b6fbdb6c65cb225a (patch)
tree52e56df44d458efa71d7de971f576d61dbdb2123 /macros/latex/contrib/siunitx/siunitx.tex
parent660cf44d2a0aee74bd6e69615fedfc57c966a260 (diff)
CTAN sync 202301040302
Diffstat (limited to 'macros/latex/contrib/siunitx/siunitx.tex')
-rw-r--r--macros/latex/contrib/siunitx/siunitx.tex119
1 files changed, 82 insertions, 37 deletions
diff --git a/macros/latex/contrib/siunitx/siunitx.tex b/macros/latex/contrib/siunitx/siunitx.tex
index a92d0ee0db..63e7f86861 100644
--- a/macros/latex/contrib/siunitx/siunitx.tex
+++ b/macros/latex/contrib/siunitx/siunitx.tex
@@ -635,26 +635,30 @@ The spelling \enquote{\cs{deka}} is provided for US users as an alternative to
Prefix & Command & Symbol & \multicolumn{1}{l}{Power} &
Prefix & Command & Symbol & \multicolumn{1}{l@{}}{Power} \\
\midrule
- \DescribePrefix{yocto} & -24 &
- \DescribePrefix{deca} & 1 \\
- \DescribePrefix{zepto} & -21 &
- \DescribePrefix{hecto} & 2 \\
- \DescribePrefix{atto} & -18 &
- \DescribePrefix{kilo} & 3 \\
- \DescribePrefix{femto} & -15 &
- \DescribePrefix{mega} & 6 \\
- \DescribePrefix{pico} & -12 &
- \DescribePrefix{giga} & 9 \\
- \DescribePrefix{nano} & -9 &
- \DescribePrefix{tera} & 12 \\
- \DescribePrefix{micro} & -6 &
- \DescribePrefix{peta} & 15 \\
- \DescribePrefix{milli} & -3 &
- \DescribePrefix{exa} & 18 \\
- \DescribePrefix{centi} & -2 &
- \DescribePrefix{zetta} & 21 \\
- \DescribePrefix{deci} & -1 &
- \DescribePrefix{yotta} & 24 \\
+ \DescribePrefix{quecto} & -30 &
+ \DescribePrefix{deca} & 1 \\
+ \DescribePrefix{ronto} & -27 &
+ \DescribePrefix{hecto} & 2 \\
+ \DescribePrefix{yocto} & -24 &
+ \DescribePrefix{kilo} & 3 \\
+ \DescribePrefix{atto} & -18 &
+ \DescribePrefix{mega} & 6 \\
+ \DescribePrefix{zepto} & -21 &
+ \DescribePrefix{giga} & 9 \\
+ \DescribePrefix{femto} & -15 &
+ \DescribePrefix{tera} & 12 \\
+ \DescribePrefix{pico} & -12 &
+ \DescribePrefix{peta} & 15 \\
+ \DescribePrefix{nano} & -9 &
+ \DescribePrefix{exa} & 18 \\
+ \DescribePrefix{micro} & -6 &
+ \DescribePrefix{zetta} & 21 \\
+ \DescribePrefix{milli} & -3 &
+ \DescribePrefix{yotta} & 24 \\
+ \DescribePrefix{centi} & -2 &
+ \DescribePrefix{ronna} & 27 \\
+ \DescribePrefix{deci} & -1 &
+ \DescribePrefix{quetta} & 30 \\
\bottomrule
\end{tabular}
\end{table}
@@ -860,6 +864,7 @@ occur (for example with the standard \cs{pm} symbol).
\DescribeUnit[picofarad]{pF} \\
\DescribeUnit[nanofarad]{nF} \\
\DescribeUnit[microfarad]{uF} \\
+ \DescribeUnit[millifarad]{mF} \\
\midrule
@@ -1441,19 +1446,20 @@ way; the options are summarised in Table~\ref{tab:opt:num:post}.
Type &
\multicolumn{1}{l@{}}{Default} \\
\midrule
- drop-exponent & Switch & false \\
- drop-uncertainty & Switch & false \\
- drop-zero-decimal & Switch & false \\
- exponent-mode & Switch & input \\
- fixed-exponent & Integer & 0 \\
- minimum-integer-digits & Integer & 0 \\
- minimum-decimal-digits & Integer & 0 \\
- round-half & Choice & up \\
- round-minimum & Literal & 0 \\
- round-mode & Choice & none \\
- round-pad & Switch & true \\
- round-precision & Integer & 2 \\
- round-zero-positive & Switch & true \\
+ drop-exponent & Switch & false \\
+ drop-uncertainty & Switch & false \\
+ drop-zero-decimal & Switch & false \\
+ exponent-mode & Switch & input \\
+ exponent-thresholds & Literal & -3:3 \\
+ fixed-exponent & Integer & 0 \\
+ minimum-integer-digits & Integer & 0 \\
+ minimum-decimal-digits & Integer & 0 \\
+ round-half & Choice & up \\
+ round-minimum & Literal & 0 \\
+ round-mode & Choice & none \\
+ round-pad & Switch & true \\
+ round-precision & Integer & 2 \\
+ round-zero-positive & Switch & true \\
\bottomrule
\end{tabular}
\end{table}
@@ -1462,9 +1468,9 @@ way; the options are summarised in Table~\ref{tab:opt:num:post}.
\DescribeOption{fixed-exponent}
Numbers can be converted to scientific notation by the package. This is
controlled by the \opt{exponent-mode} option, which takes choices \opt{input},
-\opt{fixed}, \opt{engineering} and \opt{scientific}. The \opt{fixed} setting
-will use the exponent value by the \opt{fixed-exponent} option. When
-\opt{engineering} is set, the exponent is always a power of three.
+\opt{fixed}, \opt{engineering}, \opt{scientific} and \opt{threshold}. The
+\opt{fixed} setting will use the exponent value by the \opt{fixed-exponent}
+option. When \opt{engineering} is set, the exponent is always a power of three.
\begin{LaTeXdemo}
\num{0.001} \\
\num{0.0100} \\
@@ -1491,6 +1497,40 @@ scientific notation from the input
\num{1.23e4} \\
\num[exponent-mode = fixed, fixed-exponent = 0]{1.23e4}
\end{LaTeXdemo}
+\DescribeOption{exponent-thresholds}
+When the \opt{exponent-mode} is set to \meta{threshold}, values outside of a
+threshold range for the exponent are always printed in scientific form. Within
+the threshold, they are printed as-given in the input: typically this would be
+without an exponent. The threshold range itself is controlled by
+\opt{exponent-thresholds}, which is given as
+\texttt{\meta{min}:\meta{max}} (Table~\ref{tab:threshold}).
+\begin{LaTeXdemo}[code and float]
+ \begin{table}
+ \caption{Thresholds for exponents.%
+ \label{tab:threshold}}
+ \begin{tabular}
+ {
+ @{}
+ S
+ S[exponent-mode = threshold]
+ S[exponent-mode = threshold, exponent-thresholds = -2:2]
+ @{}
+ }
+ \toprule
+ {Input} & {Threshold $-3:3$} & {Threshold $-2:2$} \\
+ \midrule
+ 0.001 & 0.001 & 0.001 \\
+ 0.012 & 0.012 & 0.012 \\
+ 0.123 & 0.123 & 0.123 \\
+ 1 & 1 & 1 \\
+ 12 & 12 & 12 \\
+ 123 & 123 & 123 \\
+ 1234 & 1234 & 1234 \\
+ \bottomrule
+ \end{tabular}
+ \end{table}
+\end{LaTeXdemo}
+
Exponent mode applies \emph{after} rounding, such that the number of decimal
places for rounding is those which appear in the output.
@@ -1653,7 +1693,9 @@ conveys. The options are summarised in Table~\ref{tab:opt:num:out}.
output-decimal-marker & Literal & . \\
output-exponent-marker & Literal & \meta{none} \\
output-open-uncertainty & Literal & ( \\ ^^A )
+ print-exponent-implicit-plus & Switch & false \\
print-implicit-plus & Switch & false \\
+ print-mantissa-implicit-plus & Switch & false \\
print-unity-mantissa & Switch & true \\
print-zero-exponent & Switch & false \\
print-zero-integer & Switch & true \\
@@ -1846,9 +1888,12 @@ compresses spacing where possible.
\end{LaTeXdemo}
\DescribeOption{print-implicit-plus}
+\DescribeOption{print-mantissa-implicit-plus}
+\DescribeOption{print-exponent-implicit-plus}
It may be useful to force all numbers to have a sign. This behaviour is
controlled by the \opt{print-implicit-plus} option: this is used if given and
-if no sign was present in the input.
+if no sign was present in the input. It is possible to set this behavior for
+the exponent and mantissa independently.
\begin{LaTeXdemo}
\num{345} \\
\num[print-implicit-plus]{345}