summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/siunitx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-05-04 23:47:51 +0000
committerKarl Berry <karl@freefriends.org>2012-05-04 23:47:51 +0000
commit1b5aa0794f701aa855c0dd5aafc06a49ec40be37 (patch)
tree69bf5c797a275518e0693a1b36df4cf656e350b9 /Master/texmf-dist/tex/latex/siunitx
parent545b1514df34ddc6dbf6998ed523b87ff1a49b81 (diff)
siunitx (4may12)
git-svn-id: svn://tug.org/texlive/trunk@26194 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/siunitx')
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviations.cfg2
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/config/siunitx-binary.cfg2
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/config/siunitx-version-1.cfg2
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/siunitx.sty55
4 files changed, 37 insertions, 24 deletions
diff --git a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviations.cfg b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviations.cfg
index dc813a21333..11d17a80cc8 100644
--- a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviations.cfg
+++ b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviations.cfg
@@ -13,7 +13,7 @@
%% See http://www.latex-project.org/lppl.txt
%% ---------------------------------------------------------------
%%
-\ProvidesExplFile {siunitx-abbreviations.cfg} {2012/04/21} {2.5b}
+\ProvidesExplFile {siunitx-abbreviations.cfg} {2012/05/03} {2.5c}
{siunitx: Abbreviated units}
\DeclareSIUnit \A { \ampere }
\DeclareSIUnit \pA { \pico \ampere }
diff --git a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-binary.cfg b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-binary.cfg
index f2e76e93aa1..ebca64c0c6e 100644
--- a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-binary.cfg
+++ b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-binary.cfg
@@ -13,7 +13,7 @@
%% See http://www.latex-project.org/lppl.txt
%% ---------------------------------------------------------------
%%
-\ProvidesExplFile {siunitx-binary.cfg} {2012/04/21} {2.5b}
+\ProvidesExplFile {siunitx-binary.cfg} {2012/05/03} {2.5c}
{siunitx: Binary units}
\DeclareBinaryPrefix \kibi { Ki } { 10 }
\DeclareBinaryPrefix \mebi { Mi } { 20 }
diff --git a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-version-1.cfg b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-version-1.cfg
index 143b2889919..820967ab99c 100644
--- a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-version-1.cfg
+++ b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-version-1.cfg
@@ -13,7 +13,7 @@
%% See http://www.latex-project.org/lppl.txt
%% ---------------------------------------------------------------
%%
-\ProvidesExplFile {siunitx-version-1.cfg} {2012/04/21} {2.5b}
+\ProvidesExplFile {siunitx-version-1.cfg} {2012/05/03} {2.5c}
{siunitx: Version 1 settings}
\keys_define:nn { siunitx } {
addsign .choice: ,
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