summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/siunitx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-04-04 20:56:29 +0000
committerKarl Berry <karl@freefriends.org>2022-04-04 20:56:29 +0000
commit32c191d57a5b2fbf62d52f9b56dde34ea98be79c (patch)
treeb7fb1c6de7fae35b94f43693aa68837b5dcab361 /Master/texmf-dist/source/latex/siunitx
parent342938e12546357fa049dadca5957de15e1b5d1a (diff)
siunitx (4apr22)
git-svn-id: svn://tug.org/texlive/trunk@62903 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/siunitx')
-rw-r--r--Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx48
-rw-r--r--Master/texmf-dist/source/latex/siunitx/siunitx.dtx2
2 files changed, 28 insertions, 22 deletions
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx
index 19b505bc333..4f3708e7065 100644
--- a/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx
+++ b/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx
@@ -2112,9 +2112,9 @@
%
% \begin{macro}{\@@_digits:NN}
% \begin{macro}[EXP]{\@@_digits:nnnnnnn}
-% \begin{macro}[EXP]{\@@_digits:Nn}
% \begin{macro}[EXP]{\@@_digits:nn}
-% \begin{macro}[EXP]{\@@_digits_S:n}
+% \begin{macro}[EXP]{\@@_digits_uncert:nnn}
+% \begin{macro}[EXP]{\@@_digits_uncert_S:nn}
% Forcing a minimum number of digits in each part is quite easy. As
% the common case is that we don't do anything here, there is no real need
% to optimise the calculation (normally also numbers have only a few digits).
@@ -2128,31 +2128,37 @@
{
\exp_not:n { {#1} {#2} }
{
- \@@_digits:Nn \l_@@_min_integer_int {#3}
+ \@@_digits:nn \l_@@_min_integer_int {#3}
\exp_not:n {#3}
}
{
\exp_not:n {#4}
- \@@_digits:Nn \l_@@_min_decimal_int {#4}
+ \@@_digits:nn \l_@@_min_decimal_int {#4}
}
- { \tl_if_blank:nF {#5} { \@@_digits_uncert:nn #5 } }
+ { \tl_if_blank:nF {#5} { \@@_digits_uncert:nnn {#4} #5 } }
\exp_not:n { {#6} {#7} }
}
-\cs_new:Npn \@@_digits:Nn #1#2
+\cs_new:Npn \@@_digits:nn #1#2
{
\int_compare:nNnT
{ #1 - \tl_count:n {#2} } > 0
- { \prg_replicate:nn { #1 - \tl_count:n {#2} } { 0 } }
+ { \prg_replicate:nn { #1 - \tl_count:n {#2} } { 0 } }
}
-\cs_new:Npn \@@_digits_uncert:nn #1#2
+\cs_new:Npn \@@_digits_uncert:nnn #1#2#3
{
- { #1 }
- { \use:c { @@_digits_uncert_ #1 :n } {#2} }
+ { #2 }
+ { \use:c { @@_digits_uncert_ #2 :nn } {#1} {#3} }
}
-\cs_new:Npn \@@_digits_uncert_S:n #1
+\cs_new:Npn \@@_digits_uncert_S:nn #1#2
{
- \exp_not:n {#1}
- \@@_digits:Nn \l_@@_min_decimal_int {#1}
+ \exp_not:n {#2}
+ \@@_digits:nn
+ {
+ \int_max:nn
+ { 0 }
+ { \l_@@_min_decimal_int - \tl_count:n {#1} + 1 }
+ }
+ {#2}
}
% \end{macrocode}
% \end{macro}
@@ -3643,25 +3649,25 @@
\exp_not:n {#5}
\exp_not:V \l_@@_exponent_base_tl
^
- { \@@_output_exponent_auxiii:nn {#1} {#2} }
+ { \@@_output_exponent_auxiii:nnn { } {#1} {#2} }
}
\cs_new:Npn \@@_output_exponent_auxii:nnnnn #1#2#3#4#5
{
\exp_not:n {#5}
\exp_not:V \l_@@_output_exp_marker_tl
- \@@_output_exponent_auxiii:nn {#1} {#2}
+ \@@_output_exponent_auxiii:nnn { \mathord } {#1} {#2}
}
-\cs_new:Npn \@@_output_exponent_auxiii:nn #1#2
+\cs_new:Npn \@@_output_exponent_auxiii:nnn #1#2#3
{
- \tl_if_blank:nTF {#1}
+ \tl_if_blank:nTF {#2}
{
\bool_lazy_and:nnT
{ \l_@@_implicit_plus_bool }
- { ! \str_if_eq_p:nn {#2} { 0 } }
- { + }
+ { ! \str_if_eq_p:nn {#3} { 0 } }
+ { #1 + }
}
- { \exp_not:n {#1} }
- \@@_output_digits:nn { integer } {#2}
+ { \exp_not:n {#1#2} }
+ \@@_output_digits:nn { integer } {#3}
}
% \end{macrocode}
% A do-nothing marker used to allow shuffling of the output and so expandable
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
index 0bd7fa2a8a9..d1de5e34da6 100644
--- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
+++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
@@ -121,7 +121,7 @@
%
% Identify the package and give the over all version information.
% \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2022-02-15} {3.0.49}
+\ProvidesExplPackage {siunitx} {2022-04-04} {3.0.50}
{A comprehensive (SI) units package}
% \end{macrocode}
%