diff options
author | Karl Berry <karl@freefriends.org> | 2022-08-08 21:00:04 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-08-08 21:00:04 +0000 |
commit | 8ca2c0f2f725360c1d1c530fc5a918bb593da82a (patch) | |
tree | d93929134d05f3f3bc0e94bc1cfd4fdb8fafb97a /Master/texmf-dist/tex | |
parent | ff8099989d5d615f53629c8f491419a183a5982e (diff) |
siunitx (8aug22)
git-svn-id: svn://tug.org/texlive/trunk@64080 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/siunitx/siunitx.sty | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty index e1f0215faa6..be7645a696c 100644 --- a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty +++ b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty @@ -42,7 +42,7 @@ }% \endinput }% -\ProvidesExplPackage {siunitx} {2022-07-23} {3.1.5} +\ProvidesExplPackage {siunitx} {2022-08-08} {3.1.6} {A comprehensive (SI) units package} \msg_new:nnnn { siunitx } { incompatible-package } { Package~'#1'~incompatible. } @@ -3309,6 +3309,26 @@ { \exp_not:n { {#1} {#2} } } \cs_new:Npn \__siunitx_number_round_uncertainty:nnn #1#2#3 { + \__siunitx_number_round_uncertainty_check:nnnw {#1} {#2} {#3} + #1#2 \q_recursion_tail \q_recursion_stop + } +\cs_new:Npn \__siunitx_number_round_uncertainty_check:nnnw #1#2#3#4 + { + \quark_if_recursion_tail_stop_do:Nn #4 { { 0 } { } { } } + \int_compare:nNnTF {#4} = 0 + { \__siunitx_number_round_uncertainty_check:nnnw } + { \__siunitx_number_round_uncertainty_check:Nnnnw #4 } + {#1} {#2} {#3} + } +\cs_new:Npn \__siunitx_number_round_uncertainty_check:Nnnnw #1#2#3#4#5 + \q_recursion_tail \q_recursion_stop + { + \int_compare:nNnTF { \tl_count:n {#1#5} } < { \tl_count:n {#4} } + { { 0 } { } { } } + { \__siunitx_number_round_uncertainty_aux:nnn {#2} {#3} {#4} } + } +\cs_new:Npn \__siunitx_number_round_uncertainty_aux:nnn #1#2#3 + { \exp_args:Nf \__siunitx_number_round_uncertainty:nnnn { \int_eval:n @@ -3318,9 +3338,12 @@ } \cs_new:Npn \__siunitx_number_round_uncertainty:nnnn #1#2#3#4 { - \exp_last_unbraced:Nf \__siunitx_number_round_uncertainty:nnnnn - { \__siunitx_number_round:nnn {#1} { } {#4} } - {#2} {#3} {#1} + \use:e + { + \exp_not:N \__siunitx_number_round_uncertainty:nnnnn + \__siunitx_number_round:nnn {#1} { } {#4} + {#2} {#3} {#1} + } } \cs_new:Npn \__siunitx_number_round_uncertainty:nnnnn #1#2#3#4#5 { |