From 7273365c115cd3b4ad4f6da7341fec0332645336 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 9 Jun 2021 20:33:44 +0000 Subject: siunitx (9jun21) git-svn-id: svn://tug.org/texlive/trunk@59534 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/siunitx/siunitx.sty | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'Master/texmf-dist/tex') diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty index 0cbaae91a00..3d9fa8db1a4 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} {2021-06-07} {3.0.11} +\ProvidesExplPackage {siunitx} {2021-06-09} {3.0.12} {A comprehensive (SI) units package} \msg_new:nnnn { siunitx } { incompatible-package } { Package~'#1'~incompatible. } @@ -2156,12 +2156,13 @@ } \cs_new_protected:Npn \__siunitx_number_process:nnnnnnnNN #1#2#3#4#5#6#7#8#9 { - \bool_lazy_and:nnF + \bool_lazy_and:nnTF { \str_if_eq_p:nn {#3} { 0 } } { \str_if_eq_p:ee { \exp_not:n {#4} } { \prg_replicate:nn { \tl_count:n {#4} } { 0 } } } + { \__siunitx_number_round:NN #8 #9 } { \__siunitx_number_exponent:NN #8 #9 \__siunitx_number_round:NN #9 #9 @@ -2744,6 +2745,17 @@ } } \cs_new:Npn \__siunitx_number_round_figures:nnnnnnn #1#2#3#4#5#6#7 + { + \bool_lazy_and:nnTF + { \str_if_eq_p:nn {#3} { 0 } } + { + \str_if_eq_p:ee + { \exp_not:n {#4} } { \prg_replicate:nn { \tl_count:n {#4} } { 0 } } + } + { \exp_not:n { {#1} {#2} {#3} {#4} {#5} {#6} {#7} } } + { \__siunitx_number_round_figures_aux:nnnnnnn {#1} {#2} {#3} {#4} {#5} {#6} {#7} } + } +\cs_new:Npn \__siunitx_number_round_figures_aux:nnnnnnn #1#2#3#4#5#6#7 { \tl_if_blank:nTF {#5} { @@ -6057,7 +6069,6 @@ \prg_return_true: } { - \show\l__siunitx_symbol_tmpa_tl \show\l__siunitx_symbol_tmpb_tl \group_end: \prg_return_false: } @@ -7140,8 +7151,8 @@ Unit~macro~#1~has~been~deprecated~in~this~release. \\ \\ The~BIPM~have~removed~this~unit~from~the~SI~Brochure.~ You~should~define~it~yourself~using~\token_to_str:N \DeclareSIUnit\ % - in~your~source. The~current~definition~is\\ \\ - \token_to_str:N \DeclareSIUnit \{ #2 \} + in~your~source.~The~current~definition~is\\ \\ + \token_to_str:N \DeclareSIUnit #1 \{ #2 \} } \cs_gset_protected:Npn \__siunitx_emulation_tmp:w #1#2 { -- cgit v1.2.3