summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/siunitx/siunitx.sty')
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/siunitx.sty55
1 files changed, 34 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
index b80d7e078c5..e729c455ff9 100644
--- a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
+++ b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
@@ -14,7 +14,7 @@
%% ---------------------------------------------------------------
%%
\RequirePackage{expl3}
-\ProvidesExplPackage {siunitx} {2012/04/21} {2.5b}
+\ProvidesExplPackage {siunitx} {2012/05/03} {2.5c}
{A comprehensive (SI) units package}
\@ifpackagelater { expl3 } { 2011/09/05 }
{ }
@@ -1990,26 +1990,38 @@
\l_siunitx_tmpa_tl
}
}
+\cs_new_protected:Npn \siunitx_number_process_fixed_aux_i:nnn #1#2#3
+ {
+ \prop_put:Nnn \l_siunitx_number_in_prop { exponent } { true }
+ \int_compare:nNnTF { \l_siunitx_process_fixed_int } > { \c_zero }
+ {
+ \prop_put:NnV \l_siunitx_number_in_prop { exponent-integer }
+ \l_siunitx_process_fixed_int
+ \prop_del:Nn \l_siunitx_number_in_prop { exponent-sign }
+ }
+ {
+ \prop_put:Nnx \l_siunitx_number_in_prop { exponent-integer }
+ { \int_eval:n { - \l_siunitx_process_fixed_int } }
+ \prop_put:Nnn \l_siunitx_number_in_prop { exponent-sign } { - }
+ }
+ \siunitx_number_process_fixed_aux_ii:nnn {#1} {#2} {#3}
+ }
+\cs_new_protected:Npn \siunitx_number_process_fixed_aux_ii:nnn #1#2#3
+ {
+ \bool_set_true:N \l_siunitx_tmp_bool
+ \tl_map_inline:nn {#1#2}
+ {
+ \str_if_eq:nnF {##1} { 0 }
+ {
+ \bool_set_false:N \l_siunitx_tmp_bool
+ \tl_map_break:
+ }
+ }
+ \bool_if:NF \l_siunitx_tmp_bool
+ { \siunitx_number_process_fixed_aux_iii:nnn {#1} {#2} {#3} }
+ }
\cs_new_protected:Npn
- \siunitx_number_process_fixed_aux_i:nnn #1#2#3 {
- \prop_put:Nnn \l_siunitx_number_in_prop { exponent }
- { true }
- \int_compare:nNnTF { \l_siunitx_process_fixed_int } > { \c_zero }
- {
- \prop_put:NnV \l_siunitx_number_in_prop { exponent-integer }
- \l_siunitx_process_fixed_int
- \prop_del:Nn \l_siunitx_number_in_prop { exponent-sign }
- }
- {
- \prop_put:Nnx \l_siunitx_number_in_prop { exponent-integer }
- { \int_eval:n { - \l_siunitx_process_fixed_int } }
- \prop_put:Nnn \l_siunitx_number_in_prop { exponent-sign } { - }
- }
- \int_compare:nNnF { #1 + 0 #2 } = { 0 }
- { \siunitx_number_process_fixed_aux_ii:nnn {#1} {#2} {#3} }
-}
-\cs_new_protected:Npn
- \siunitx_number_process_fixed_aux_ii:nnn #1#2#3 {
+ \siunitx_number_process_fixed_aux_iii:nnn #1#2#3 {
\int_compare:nNnTF {#3} > { \l_siunitx_process_fixed_int }
{ \siunitx_number_process_fixed_large:nnn {#1} {#2} {#3} }
{
@@ -5751,7 +5763,8 @@
\cs_new_protected:Npn \siunitx_table_print_s:
{
\siunitx_table_column_begin:n { \l_siunitx_table_unit_align_skip }
- \siunitx_unit_output:Vn \l_siunitx_table_collect_tl { }
+ \tl_if_empty:NF \l_siunitx_table_collect_tl
+ { \siunitx_unit_output:Vn \l_siunitx_table_collect_tl { } }
\siunitx_table_column_end:n { \l_siunitx_table_unit_align_skip }
}
\prop_new:N \l_siunitx_table_model_prop