summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-07-25 19:34:11 +0000
committerKarl Berry <karl@freefriends.org>2023-07-25 19:34:11 +0000
commitaa1fbdb9535e9887b1fa63d62fdbdbec5ad7bc0f (patch)
tree7ba199bc0a987298216ec86c82e28a51a348c599 /Master/texmf-dist/tex
parent2ab313d95b3ce814b2d5a6a262207c5306f8715b (diff)
siunitx (25jul23)
git-svn-id: svn://tug.org/texlive/trunk@67730 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/siunitx.sty60
1 files changed, 29 insertions, 31 deletions
diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
index 0b201695cc6..5bf7e83d355 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} {2023-07-20} {3.2.7}
+\ProvidesExplPackage {siunitx} {2023-07-25} {3.2.8}
{A comprehensive (SI) units package}
\msg_new:nnnn { siunitx } { incompatible-package }
{ Package~'#1'~incompatible. }
@@ -1398,7 +1398,7 @@
\siunitx_print_number:V \l__siunitx_compound_bracket_close_tl
}
{ \__siunitx_compound_print:N \siunitx_print_number:x }
- \__siunitx_compound_print_quantity:n { }
+ \__siunitx_compound_print_quantity:n { \c_empty_tl }
}
\group_end:
}
@@ -3056,39 +3056,34 @@
\__siunitx_number_round_auxvi:nnN
{#1} { } #2 \q_recursion_tail \q_recursion_stop
}
- \bool_lazy_or:nnTF
- { \int_compare_p:nNn { 0 \tl_head:n {#1} } < 5 }
- {
- \bool_lazy_all_p:n
- {
- { \l__siunitx_number_round_half_even_bool }
- { ! \int_if_odd_p:n {#3} }
- { \__siunitx_number_round_if_half_p:n {#1} }
- }
- }
+ \__siunitx_number_round_auxvii:nnTF {#1} {#3}
{ \__siunitx_number_round_final_decimal:nnw }
- { \__siunitx_number_round_auxvii:nnN }
+ { \__siunitx_number_round_auxviii:nnN }
{#2} { } #3
}
\cs_new:Npn \__siunitx_number_round_auxvi:nnN #1#2#3
{
\quark_if_recursion_tail_stop_do:Nn #3
{ { 0 } { } }
+ \__siunitx_number_round_auxvii:nnTF {#1} {#3}
+ { \__siunitx_number_round_final_integer:nnw }
+ { \__siunitx_number_round_auxix:nnN }
+ { } {#2} #3
+ }
+\cs_new:Npn \__siunitx_number_round_auxvii:nnTF #1#2
+ {
\bool_lazy_or:nnTF
{ \int_compare_p:nNn { 0 \tl_head:n {#1} } < 5 }
{
\bool_lazy_all_p:n
{
{ \l__siunitx_number_round_half_even_bool }
- { ! \int_if_odd_p:n {#3} }
+ { ! \int_if_odd_p:n {#2} }
{ \__siunitx_number_round_if_half_p:n {#1} }
}
}
- { \__siunitx_number_round_final_integer:nnw }
- { \__siunitx_number_round_auxviii:nnN }
- { } {#2} #3
}
-\cs_new:Npn \__siunitx_number_round_auxvii:nnN #1#2#3
+\cs_new:Npn \__siunitx_number_round_auxviii:nnN #1#2#3
{
\quark_if_recursion_tail_stop_do:Nn #3
{
@@ -3099,12 +3094,12 @@
{ \__siunitx_number_round_truncate:n {#2} }
}
{
- \__siunitx_number_round_auxviii:nnN {#2} { } #1
+ \__siunitx_number_round_auxix:nnN {#2} { } #1
\q_recursion_tail \q_recursion_stop
}
}
\int_compare:nNnTF {#3} = 9
- { \__siunitx_number_round_auxvii:nnN {#1} { 0 #2 } }
+ { \__siunitx_number_round_auxviii:nnN {#1} { 0 #2 } }
{
\int_compare:nNnTF {#3} = 0
{
@@ -3127,7 +3122,7 @@
}
}
}
-\cs_new:Npn \__siunitx_number_round_auxviii:nnN #1#2#3
+\cs_new:Npn \__siunitx_number_round_auxix:nnN #1#2#3
{
\quark_if_recursion_tail_stop_do:Nn #3
{
@@ -3147,7 +3142,7 @@
}
}
\int_compare:nNnTF {#3} = 9
- { \__siunitx_number_round_auxviii:nnN {#1} { 0 #2 } }
+ { \__siunitx_number_round_auxix:nnN {#1} { 0 #2 } }
{
\__siunitx_number_round_final:fn
{ \int_eval:n { #3 + 1 } }
@@ -4513,17 +4508,20 @@
\cs_generate_variant:Nn \siunitx_print_unit:n { V , x }
\cs_new_protected:Npn \__siunitx_print_aux:nn #1#2
{
- \tl_if_empty:cTF { l__siunitx_print_ #1 _color_tl }
- { \use:n }
- { \exp_args:Nv \textcolor { l__siunitx_print_ #1 _color_tl } }
- {
- \use:c
+ \tl_if_empty:oF {#2}
+ {
+ \tl_if_empty:cTF { l__siunitx_print_ #1 _color_tl }
+ { \use:n }
+ { \exp_args:Nv \textcolor { l__siunitx_print_ #1 _color_tl } }
{
- siunitx_print_
- \tl_use:c { l__siunitx_print_ #1 _mode_tl } :n
+ \use:c
+ {
+ siunitx_print_
+ \tl_use:c { l__siunitx_print_ #1 _mode_tl } :n
+ }
+ {#2}
}
- {#2}
- }
+ }
}
\cs_new_protected:Npn \siunitx_print_match:n #1
{