summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/siunitx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-04-17 22:40:08 +0000
committerKarl Berry <karl@freefriends.org>2011-04-17 22:40:08 +0000
commit40e44782519393652e58da7648eab79685783805 (patch)
tree90169fede512a4b033599b0e393779c7d1e45fe6 /Master/texmf-dist/tex/latex/siunitx
parent28e4833279c49989c8090e430ae116426000128b (diff)
siunitx (17apr11)
git-svn-id: svn://tug.org/texlive/trunk@22108 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-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.sty68
3 files changed, 39 insertions, 33 deletions
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 1454b87328f..347d2ab965c 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} {2011/04/13} {2.2}
+\ProvidesExplFile {siunitx-binary.cfg} {2011/04/16} {2.2a}
{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 2fea1ee48d2..6d092a7aea7 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} {2011/04/13} {2.2}
+\ProvidesExplFile {siunitx-version-1.cfg} {2011/04/16} {2.2a}
{siunitx: Version 1 settings}
\keys_set:nn { siunitx }
{ load-configurations = { abbreviations , binary } }
diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
index 7bfb956c781..9b272ce7654 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} {2011/04/13} {2.2}
+\ProvidesExplPackage {siunitx} {2011/04/16} {2.2a}
{A comprehensive (SI) units package}
\cs_if_exist:NTF \msg_set:nnnn
{
@@ -872,8 +872,7 @@
\tl_set:Nn \l_siunitx_number_next_tl {##2}
\tl_set:Nn \l_siunitx_number_multi_tl { product }
}
- \exp_last_unbraced:NV \siunitx_tmp:w \l_siunitx_number_arg_tl
- \q_stop
+ \exp_after:wN \siunitx_tmp:w \l_siunitx_number_arg_tl \q_stop
\tl_if_empty:NT \l_siunitx_number_arg_tl
{ \siunitx_error:n { starting-product-token } }
\tl_if_empty:NT \l_siunitx_number_next_tl
@@ -894,8 +893,7 @@
\tl_set:Nn \l_siunitx_number_denominator_tl {##2}
\tl_set:Nn \l_siunitx_number_multi_tl { quotient }
}
- \exp_last_unbraced:NV \siunitx_tmp:w \l_siunitx_number_arg_tl
- \q_stop
+ \exp_after:wN \siunitx_tmp:w \l_siunitx_number_arg_tl \q_stop
\tl_if_empty:NT \l_siunitx_number_numerator_tl
{ \siunitx_error:n { starting-quotient-token } }
\tl_if_empty:NT \l_siunitx_number_denominator_tl
@@ -1058,8 +1056,7 @@
\cs_new_protected:Npn \siunitx_number_in_parse_loop:N #1 { }
\cs_new_protected:Npn \siunitx_number_in_parse_more:N #1 { }
\cs_new_protected:Npn \siunitx_number_in_parse_relation:N #1 {
- \exp_last_unbraced:NV \siunitx_number_in_parse_relation:w
- #1 \q_stop #1
+ \exp_after:wN \siunitx_number_in_parse_relation:w #1 \q_stop #1
}
\cs_new_protected:Npn \siunitx_number_in_parse_relation:w
#1#2 \q_stop #3 {
@@ -1954,7 +1951,7 @@
\tl_set:Nn \l_siunitx_tmpb_tl \l_siunitx_tmpb_tl
\tl_set:Nx \l_siunitx_tmpa_tl
{ \l_siunitx_tmpa_tl { \l_siunitx_tmpb_tl } }
- \exp_last_unbraced:NV \siunitx_number_process_fixed_aux_i:nnn
+ \exp_after:wN \siunitx_number_process_fixed_aux_i:nnn
\l_siunitx_tmpa_tl
}
}
@@ -2337,7 +2334,7 @@
\l_siunitx_round_decimal_out_tl
}
{
- \exp_last_unbraced:NV \siunitx_number_process_round_tidy_aux:w
+ \exp_after:wN \siunitx_number_process_round_tidy_aux:w
\l_siunitx_process_round_min_tl . . \q_stop {#1}
}
}
@@ -2389,7 +2386,7 @@
\tl_set:Nn \l_siunitx_tmpb_tl \l_siunitx_tmpb_tl
\tl_set:Nx \l_siunitx_tmpa_tl
{ \l_siunitx_tmpa_tl { \l_siunitx_tmpb_tl } }
- \exp_last_unbraced:NV \siunitx_number_process_scientific_aux_i:nnn
+ \exp_after:wN \siunitx_number_process_scientific_aux_i:nnn
\l_siunitx_tmpa_tl
}
}
@@ -2426,7 +2423,7 @@
{ \l_siunitx_tmpa_tl } { \int_use:N \l_siunitx_tmp_int #2 }
{ #3 + 1 }
}
- \exp_last_unbraced:NV \siunitx_number_process_scientific_aux_ii:nnn
+ \exp_after:wN \siunitx_number_process_scientific_aux_ii:nnn
\l_siunitx_tmpa_tl
}
\cs_new_protected_nopar:Npn
@@ -2739,6 +2736,7 @@
group-decimal-digits = #1,
group-integer-digits = #1
},
+ group-digits .default:n = true ,
group-four-digits .bool_set:N = \l_siunitx_group_four_bool,
group-integer-digits .bool_set:N =
\l_siunitx_group_integer_bool,
@@ -3038,13 +3036,9 @@
\cs_new_protected_nopar:Npn \siunitx_number_format_group_aux:nn #1#2 {
\prop_if_in:NnT \l_siunitx_number_in_prop { #1 - #2 }
{
- \prop_if_in:NnTF \l_siunitx_number_in_prop { symbolic }
+ \bool_if:cTF { l_siunitx_group_ #2 _bool }
+ { \siunitx_number_format_group_four:nn {#1} {#2} }
{ \siunitx_number_format_copy:n { #1 - #2 } }
- {
- \bool_if:cTF { l_siunitx_group_ #2 _bool }
- { \siunitx_number_format_group_four:nn {#1} {#2} }
- { \siunitx_number_format_copy:n { #1 - #2 } }
- }
}
}
\cs_new_protected_nopar:Npn \siunitx_number_format_group_four:nn #1#2 {
@@ -3053,8 +3047,7 @@
\bool_if:NTF \l_siunitx_group_four_bool
{ \siunitx_number_format_group_four_aux:nn {#1} {#2} }
{
- \exp_last_unbraced:NV
- \siunitx_number_format_group_four_aux:NNNNNNw
+ \exp_after:wN \siunitx_number_format_group_four_aux:NNNNNNw
\l_siunitx_tmpa_tl \q_no_value \q_no_value \q_no_value
\q_no_value \q_no_value \q_stop
{ \siunitx_number_format_copy:n {#1 - #2} }
@@ -3075,8 +3068,7 @@
\cs_new_protected_nopar:Npn \siunitx_number_format_group_decimal: {
\tl_if_empty:NF \l_siunitx_tmpa_tl
{
- \exp_last_unbraced:NV
- \siunitx_number_format_group_decimal_aux:NNNN
+ \exp_after:wN \siunitx_number_format_group_decimal_aux:NNNN
\l_siunitx_tmpa_tl { } { } { }
}
}
@@ -4242,6 +4234,7 @@
{
\siunitx_unit_if_literal:nTF {#1}
{
+ \tl_clear:N \l_siunitx_per_mode_tl
\bool_if:NTF \l_siunitx_unit_forbid_literal_bool
{
\msg_error:nnx { siunitx } { literal-unit }
@@ -4791,8 +4784,7 @@
{
\cs_set:Npn \siunitx_tmp:w ##1 - ##2 \q_stop
{ \tl_set:Nn \l_siunitx_tmpa_tl {##2} }
- \exp_last_unbraced:NV \siunitx_tmp:w
- \l_siunitx_tmpa_tl \q_stop
+ \exp_after:wN \siunitx_tmp:w \l_siunitx_tmpa_tl \q_stop
}
{ \tl_put_left:Nn \l_siunitx_tmpa_tl { - } }
}
@@ -5327,16 +5319,17 @@
{ > { \bcolumn #1 \@nil } #1 < { \ecolumn } }
\cs_set:Npn \siunitx_tmp:w #1 \NC@do S #2 \q_stop
{ \toks_set:Nn \NC@list { #1 #2 } }
- \exp_last_unbraced:NV \siunitx_tmp:w \NC@list \q_stop
+ \exp_after:wN \siunitx_tmp:w \NC@list \q_stop
\cs_gundefine:N \NC@find@S
}
{ }
}
\cs_new_protected_nopar:Npn \siunitx_table_rewrite_create:N #1 {
- \tl_set:Nn \l_siunitx_tmpa_tl { \NC@do #1 }
- \tl_put_right:NV \l_siunitx_tmpa_tl \NC@list
\newcolumntype {#1} { }
- \toks_set:NV \NC@list \l_siunitx_tmpa_tl
+ \cs_set_protected_nopar:Npn
+ \siunitx_table_rewrite_create_aux:w \NC@do ##1##2 \NC@do #1
+ { \NC@list { \NC@do ##1 \NC@do #1 ##2 } }
+ \exp_after:wN \siunitx_table_rewrite_create_aux:w \toks_use:N \NC@list
\exp_args:NNc \renewcommand * { NC@rewrite@ #1 } [1] [ ]
{
\toks_put_right:Nn \@temptokena
@@ -5348,6 +5341,7 @@
\NC@find
}
}
+\cs_new_protected_nopar:Npn \siunitx_table_rewrite_create_aux:w { }
\AtBeginDocument { \siunitx_table_rewrite_create:N s }
\AtBeginDocument { \siunitx_table_rewrite_create:N S }
\tl_new:N \l_siunitx_table_collect_tl
@@ -5397,8 +5391,8 @@
{
\tl_use:N \l_siunitx_table_collect_pre_tl
\tl_clear:N \l_siunitx_table_collect_pre_tl
- \cs_set_nopar:Npx \siunitx_table_collect_next:
- { \exp_not:N \siunitx_table_collect_get: \exp_not:V #1 }
+ \cs_set_nopar:Npn \siunitx_table_collect_next:
+ { \exp_after:wN \siunitx_table_collect_get: #1 }
}
{
\bool_if:NTF \l_siunitx_table_collect_pre_bool
@@ -5491,6 +5485,11 @@
\cs_set_eq:NN \siunitx_table_print: \prg_do_nothing:
\tabularnewline
}
+\cs_new_protected_nopar:Npn \siunitx_table_collect_end: {
+ \siunitx_table_print:
+ \cs_set_eq:NN \siunitx_table_print: \prg_do_nothing:
+ \end
+}
\cs_new_protected:Npn \siunitx_table_collect_not_braced:N #1 {
\token_if_eq_meaning:NNF #1 \tex_ignorespaces:D
{
@@ -5506,7 +5505,7 @@
{ \cs_set_eq:NN \siunitx_table_collect_next: ##1 }
}
\tl_map_function:nN
- { \cs:w \end \scan_stop: \siunitx_table_print: }
+ { \cs:w \scan_stop: \siunitx_table_print: }
\siunitx_table_collect_not_braced_aux_ii:N
\token_if_eq_meaning:NNT \siunitx_table_collect_next:
\siunitx_table_collect_get:
@@ -5516,7 +5515,14 @@
\cs_set_eq:NN \siunitx_table_collect_next:
\siunitx_table_collect_newline:
}
- { \siunitx_table_collect_token:N #1 }
+ {
+ \token_if_eq_meaning:NNTF #1 \end
+ {
+ \cs_set_eq:NN \siunitx_table_collect_next:
+ \siunitx_table_collect_end:
+ }
+ { \siunitx_table_collect_token:N #1 }
+ }
}
}
\cs_new_protected:Npn \siunitx_table_collect_not_braced_aux_ii:N #1 { }