summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-11-05 21:46:53 +0000
committerKarl Berry <karl@freefriends.org>2010-11-05 21:46:53 +0000
commit8dfe881fa65f359b08beeb38bc01641c8cc17300 (patch)
tree6f23803bdf6a1c0aef9a8573740fd2de45e8a466 /Master/texmf-dist/tex/latex
parent74d648477376ae0b6d4246a3b7aa77808d4cfc31 (diff)
siunitx (5nov10)
git-svn-id: svn://tug.org/texlive/trunk@20332 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-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.sty110
3 files changed, 65 insertions, 49 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 06828426a32..0bf6990ad38 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} {2010/10/27} {2.1}
+\ProvidesExplFile {siunitx-binary.cfg} {2010/11/05} {2.1a}
{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 6231a3024ca..d20e4d967b8 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} {2010/10/27} {2.1}
+\ProvidesExplFile {siunitx-version-1.cfg} {2010/11/05} {2.1a}
{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 35bc7ed9ae9..2016a9f3e57 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} {2010/10/27} {2.1}
+\ProvidesExplPackage {siunitx} {2010/11/05} {2.1a}
{A comprehensive (SI) units package}
\msg_set:nnnn { siunitx } { incompatible-package }
{ Package~'#1'~incompatible. }
@@ -51,7 +51,6 @@
\cs_new_protected:Npn \siunitx_error:n #1 {
\siunitx_error:nxx {#1} { } { }
}
-\cs_generate_variant:Nn \siunitx_error:nx { nV }
\AtBeginDocument {
\cs_if_free:cT { T@TS1 }
{
@@ -81,7 +80,7 @@
\cs_generate_variant:Nn \siunitx_tl_put_right_math:Nn { cV }
\seq_new:N \c_siunitx_old_options_seq
\cs_set_protected_nopar:Npn \siunitx_tmp:w #1 {
- \seq_put_right:Nx \c_siunitx_old_options_seq { \tl_to_str:n {#1} }
+ \seq_put_right:No \c_siunitx_old_options_seq { \tl_to_str:n {#1} }
}
\siunitx_tmp:w { addsign }
\siunitx_tmp:w { allowlitunits }
@@ -293,8 +292,8 @@
\group_end:
\prg_new_conditional:Npnn \siunitx_cs_if_tl:N #1 { T , F, TF , p }
{
- \exp_after:wN \siunitx_cs_if_tl_aux:w
- \token_to_meaning:N #1 MACRO \q_stop
+ \exp_last_unbraced:No \siunitx_cs_if_tl_aux:w
+ { \token_to_meaning:N #1 MACRO \q_stop }
{
\cs_if_exist:cTF { \cs_to_str:N #1 ~ }
{ \prg_return_false: }
@@ -307,8 +306,8 @@
\prg_new_conditional:Npnn \siunitx_cs_if_macro:N #1
{ T , F , TF , p }
{
- \exp_after:wN \siunitx_cs_if_tl_aux:w
- \token_to_meaning:N #1 MACRO \q_stop
+ \exp_last_unbraced:No \siunitx_cs_if_tl_aux:w
+ { \token_to_meaning:N #1 MACRO \q_stop }
{ \prg_return_true: }
{ \prg_return_false: }
}
@@ -457,7 +456,7 @@
\siunitx_detect_font_weight_text:
}
\cs_new_protected_nopar:Npn \siunitx_detect_font_weight_math: {
- \str_if_eq:nVT { bold } \math@version
+ \str_if_eq:VnT \math@version { bold }
{
\cs_set:Npn \siunitx_font_weight:
{
@@ -465,15 +464,15 @@
\bfseries
}
}
- \str_if_eq:nVT { light } \math@version
+ \str_if_eq:VnT \math@version { light }
{
\cs_set:Npn \siunitx_font_weight:
{ \lseries }
}
}
\cs_new_protected_nopar:Npn \siunitx_detect_font_weight_text: {
- \tl_set:Nx \l_siunitx_tmpa_tl { \exp_args:NV \tl_head:n \f@series }
- \str_if_eq:nVT { b } \l_siunitx_tmpa_tl
+ \tl_set:Nx \l_siunitx_tmpa_tl { \tl_head:V \f@series }
+ \str_if_eq:VnT \l_siunitx_tmpa_tl { b }
{
\cs_set:Npn \siunitx_font_weight:
{
@@ -481,7 +480,7 @@
\bfseries
}
}
- \str_if_eq:nVT { l } \l_siunitx_tmpa_tl
+ \str_if_eq:VnT \l_siunitx_tmpa_tl { l }
{
\cs_set:Npn \siunitx_font_weight:
{ \lseries }
@@ -509,9 +508,9 @@
{ \tl_set:Nn \l_siunitx_font_family_tl { tt } }
}
\cs_new_protected_nopar:Npn \siunitx_detect_font_shape: {
- \str_if_eq:nVT { it } \f@shape
+ \str_if_eq:VnT \f@shape { it }
{ \cs_set_nopar:Npn \siunitx_font_shape: { \itshape } }
- \str_if_eq:nVT { sl } \f@shape
+ \str_if_eq:VnT \f@shape { sl }
{ \cs_set_nopar:Npn \siunitx_font_shape: { \slshape } }
}
\cs_new_protected_nopar:Npn \siunitx_detect_font_mode: {
@@ -794,7 +793,8 @@
\tl_set:Nn \l_siunitx_number_next_tl {##2}
\tl_set:Nn \l_siunitx_number_multi_tl { product }
}
- \exp_after:wN \siunitx_tmp:w \l_siunitx_number_arg_tl \q_stop
+ \exp_last_unbraced:NV \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
@@ -815,7 +815,8 @@
\tl_set:Nn \l_siunitx_number_denominator_tl {##2}
\tl_set:Nn \l_siunitx_number_multi_tl { quotient }
}
- \exp_after:wN \siunitx_tmp:w \l_siunitx_number_arg_tl \q_stop
+ \exp_last_unbraced:NV \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
@@ -964,7 +965,8 @@
\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_after:wN \siunitx_number_in_parse_relation:w #1 \q_stop #1
+ \exp_last_unbraced:NV \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 {
@@ -1417,7 +1419,8 @@
{
\prop_get:NnN \l_siunitx_number_in_prop { complex-sign }
\l_siunitx_tmpa_tl
- \siunitx_error:nV { misplaced-sign-token } \l_siunitx_tmpa_tl
+ \siunitx_error:nx { misplaced-sign-token }
+ { \exp_not:V \l_siunitx_tmpa_tl }
}
\prop_get:NnN \l_siunitx_number_in_prop { mantissa-sign }
\l_siunitx_tmpa_tl
@@ -1587,9 +1590,9 @@
\cs_new_protected_nopar:Npn
\siunitx_number_process_figures_count_aux:n #1 {
\int_set:Nn \l_siunitx_tmp_int
- { \exp_args:Nv \tl_head:n { l_siunitx_round_ #1 _in_tl } }
+ { \tl_head:v { l_siunitx_round_ #1 _in_tl } }
\tl_set:cx { l_siunitx_round_ #1 _in_tl }
- { \exp_args:Nv \tl_tail:n { l_siunitx_round_ #1 _in_tl } }
+ { \tl_tail:v { l_siunitx_round_ #1 _in_tl } }
\tl_put_left:cV { l_siunitx_round_ #1 _out_tl } \l_siunitx_tmp_int
\bool_if:NF \l_siunitx_round_bool
{
@@ -1637,7 +1640,7 @@
\int_compare:nNnF { \l_siunitx_round_int } > { 1 }
{
\int_set:Nn \l_siunitx_tmp_int
- { \exp_args:NV \tl_head:n \l_siunitx_round_integer_in_tl }
+ { \tl_head:V \l_siunitx_round_integer_in_tl }
\bool_if:NT \l_siunitx_round_bool
{ \int_incr:N \l_siunitx_tmp_int }
\bool_set_false:N \l_siunitx_round_bool
@@ -1658,7 +1661,7 @@
}
\int_decr:N \l_siunitx_round_int
\tl_set:Nx \l_siunitx_round_integer_in_tl
- { \exp_args:NV \tl_tail:n \l_siunitx_round_integer_in_tl }
+ { \tl_tail:V \l_siunitx_round_integer_in_tl }
\tl_if_empty:NF \l_siunitx_round_integer_in_tl
{ \siunitx_number_process_figures_integer: }
}
@@ -1690,7 +1693,7 @@
{ \tl_set:Nn \l_siunitx_tmpb_tl { 0 } }
\tl_set:Nx \l_siunitx_tmpa_tl
{ \l_siunitx_tmpa_tl { \l_siunitx_tmpb_tl } }
- \exp_after:wN \siunitx_number_process_fixed_aux_i:nnn
+ \exp_last_unbraced:NV \siunitx_number_process_fixed_aux_i:nnn
\l_siunitx_tmpa_tl
}
}
@@ -1850,7 +1853,7 @@
\quark_if_no_value:NF \l_siunitx_tmpa_tl
{
\int_compare:nNnT
- { \exp_args:NV \tl_head:n \l_siunitx_tmpa_tl } > { 4 }
+ { \tl_head:V \l_siunitx_tmpa_tl } > { 4 }
{
\prop_get:NnN \l_siunitx_number_in_prop { #1 -integer }
\l_siunitx_tmpa_tl
@@ -1943,9 +1946,9 @@
\cs_new_protected_nopar:Npn
\siunitx_number_process_places_integer:n #1 {
\int_set:Nn \l_siunitx_tmp_int
- { \exp_args:NV \tl_head:n \l_siunitx_round_integer_in_tl }
+ { \tl_head:V \l_siunitx_round_integer_in_tl }
\tl_set:Nx \l_siunitx_round_integer_in_tl
- { \exp_args:NV \tl_tail:n \l_siunitx_round_integer_in_tl }
+ { \tl_tail:V \l_siunitx_round_integer_in_tl }
\bool_if:NT \l_siunitx_round_bool
{ \int_incr:N \l_siunitx_tmp_int }
\bool_set_false:N \l_siunitx_round_bool
@@ -1988,13 +1991,13 @@
\int_compare:nNnF { \l_siunitx_round_int } > { 1 }
{ \siunitx_number_process_round_decimal_aux: }
\tl_set:Nx \l_siunitx_round_decimal_in_tl
- { \exp_args:NV \tl_tail:n \l_siunitx_round_decimal_in_tl }
+ { \tl_tail:V \l_siunitx_round_decimal_in_tl }
\int_decr:N \l_siunitx_round_int
}
\cs_new_protected_nopar:Npn
\siunitx_number_process_round_decimal_aux: {
\int_set:Nn \l_siunitx_tmp_int
- { \exp_args:NV \tl_head:n \l_siunitx_round_decimal_in_tl }
+ { \tl_head:V \l_siunitx_round_decimal_in_tl }
\bool_if:NT \l_siunitx_round_bool
{ \int_incr:N \l_siunitx_tmp_int }
\bool_set_false:N \l_siunitx_round_bool
@@ -2073,7 +2076,7 @@
{ \tl_set:Nn \l_siunitx_tmpb_tl { 0 } }
\tl_set:Nx \l_siunitx_tmpa_tl
{ \l_siunitx_tmpa_tl { \l_siunitx_tmpb_tl } }
- \exp_after:wN \siunitx_number_process_scientific_aux_i:nnn
+ \exp_last_unbraced:NV \siunitx_number_process_scientific_aux_i:nnn
\l_siunitx_tmpa_tl
}
}
@@ -2412,7 +2415,7 @@
\prop_get:NnN \l_siunitx_number_in_prop {#1} \l_siunitx_tmpa_tl
\quark_if_no_value:NF \l_siunitx_tmpa_tl
{
- \str_if_eq:nVT { - } \l_siunitx_tmpa_tl
+ \str_if_eq:VnT \l_siunitx_tmpa_tl { - }
{
\prop_put:NnV \l_siunitx_number_out_prop { color }
\l_siunitx_negative_color_tl
@@ -2626,7 +2629,8 @@
\bool_if:NTF \l_siunitx_group_four_bool
{ \siunitx_number_format_group_four_aux:nn {#1} {#2} }
{
- \exp_after:wN \siunitx_number_format_group_four_aux:NNNNNNw
+ \exp_last_unbraced:NV
+ \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} }
@@ -2647,7 +2651,8 @@
\cs_new_protected_nopar:Npn \siunitx_number_format_group_decimal: {
\tl_if_empty:NF \l_siunitx_tmpa_tl
{
- \exp_after:wN \siunitx_number_format_group_decimal_aux:NNNN
+ \exp_last_unbraced:NV
+ \siunitx_number_format_group_decimal_aux:NNNN
\l_siunitx_tmpa_tl { } { } { }
}
}
@@ -3592,7 +3597,7 @@
}
}
\cs_new_protected:Npn \siunitx_unit_first_token:n #1 {
- \exp_after:wN \token_to_str:N \tl_head:w #1 \q_stop
+ \exp_last_unbraced:No \token_to_str:N { \tl_head:w #1 \q_stop }
}
\cs_new:cpn { siunitx_ \token_to_str:N \per _literal:w } { / }
\cs_new_protected:cpn { siunitx_ \token_to_str:N \per _function:w } {
@@ -4036,7 +4041,7 @@
\cs_new_protected_nopar:Npn \siunitx_unit_format_add_aux:n #1 {
\tl_if_empty:cF { l_siunitx_unit #1 _tl }
{
- \str_if_eq:nVTF { repeat } \l_siunitx_per_mode_tl
+ \str_if_eq:VnTF \l_siunitx_per_mode_tl { repeat }
{
\tl_set:Nx \l_siunitx_tmpa_tl
{ per- \int_eval:n { \l_siunitx_unit_int + 1 } }
@@ -4193,10 +4198,10 @@
{ \siunitx_unit_format_power_aux: }
}
\cs_new_protected_nopar:Npn \siunitx_unit_format_power_aux: {
- \str_if_eq:nVTF { repeat } \l_siunitx_per_mode_tl
+ \str_if_eq:VnTF \l_siunitx_per_mode_tl { repeat }
{ \siunitx_unit_format_power_repeat: }
{ \siunitx_unit_format_power_per: }
- \str_if_eq:nVF { 1 } \l_siunitx_tmpa_tl
+ \str_if_eq:VnF \l_siunitx_tmpa_tl { 1 }
{
\siunitx_unit_format_power_brackets:
\tl_put_right:Nx \l_siunitx_unit_current_tl
@@ -4246,7 +4251,8 @@
{
\cs_set:Npn \siunitx_tmp:w ##1 - ##2 \q_stop
{ \tl_set:Nn \l_siunitx_tmpa_tl {##2} }
- \exp_after:wN \siunitx_tmp:w \l_siunitx_tmpa_tl \q_stop
+ \exp_last_unbraced:NV \siunitx_tmp:w
+ \l_siunitx_tmpa_tl \q_stop
}
{ \tl_put_left:Nn \l_siunitx_tmpa_tl { - } }
}
@@ -4299,7 +4305,7 @@
{ unit- \int_use:N \l_siunitx_unit_int }
\prop_get:NVN \l_siunitx_unit_prop \l_siunitx_tmpb_tl
\l_siunitx_tmpb_tl
- \str_if_eq:nVT { \gram } \l_siunitx_tmpb_tl
+ \str_if_eq:VnT \l_siunitx_tmpb_tl { \gram }
{
\tl_set:Nx \l_siunitx_unit_prefix_current_tl
{ \int_eval:n { \l_siunitx_unit_prefix_current_tl - 3 } }
@@ -4371,8 +4377,8 @@
\group_end:
\cs_set_protected_nopar:Npn \siunitx_unit_format_qualifier_subscript:
{
- \tl_put_right:No \l_siunitx_unit_current_tl
- { \exp_after:wN @ \exp_after:wN { \l_siunitx_tmpa_tl } }
+ \tl_put_right:Nx \l_siunitx_unit_current_tl
+ { @ { \exp_not:V \l_siunitx_tmpa_tl } }
}
}
\cs_new_protected_nopar:Npn \siunitx_unit_format_sorted: {
@@ -4519,8 +4525,14 @@
\tl_set:Nx \l_siunitx_tmpa_tl
{
\bool_if:NTF \l_siunitx_tight_bool
- { { \exp_not:V \l_siunitx_exponent_product_tl } }
- { { } \exp_not:V \l_siunitx_exponent_product_tl { } }
+ {
+ \exp_not:N \ensuremath
+ { { \exp_not:V \l_siunitx_exponent_product_tl } }
+ }
+ {
+ \exp_not:N \ensuremath
+ { { } \exp_not:V \l_siunitx_exponent_product_tl { } }
+ }
\int_use:N \l_siunitx_unit_prefix_base_int
^ { \int_use:N \l_siunitx_unit_prefix_int }
}
@@ -4631,8 +4643,11 @@
\tl_clear:N \l_siunitx_list_tl
\tl_clear:N \l_siunitx_list_current_tl
\tl_map_function:nN {#1} \siunitx_list_numbers_aux_ii:n
- \tl_put_right:NV \l_siunitx_list_tl
- \l_siunitx_list_separator_final_tl
+ \tl_set:Nx \l_siunitx_tmpa_tl
+ {
+ \exp_not:N \text { \exp_not:V \l_siunitx_list_separator_final_tl }
+ }
+ \tl_put_right:NV \l_siunitx_list_tl \l_siunitx_tmpa_tl
\tl_put_right:NV \l_siunitx_list_tl \l_siunitx_list_current_tl
\tl_use:N \l_siunitx_list_tl
}
@@ -4640,8 +4655,9 @@
\tl_if_empty:NTF \l_siunitx_list_tl
{ \tl_set_eq:NN \l_siunitx_list_tl \l_siunitx_list_current_tl }
{
- \tl_put_right:NV \l_siunitx_list_tl
- \l_siunitx_list_separator_tl
+ \tl_set:Nx \l_siunitx_tmpa_tl
+ { \exp_not:N \text { \exp_not:V \l_siunitx_list_separator_tl } }
+ \tl_put_right:NV \l_siunitx_list_tl \l_siunitx_tmpa_tl
\tl_put_right:NV \l_siunitx_list_tl \l_siunitx_list_current_tl
}
\tl_set:Nn \l_siunitx_list_current_tl
@@ -5782,7 +5798,7 @@
\@ifpackageloaded { fourier } { }
{ \keys_set:nn { siunitx } { text-ohm = \textohm } }
}
- \str_if_eq:nVT { OT1 } \encodingdefault
+ \str_if_eq:VnT \encodingdefault { OT1 }
{
\keys_set:nn { siunitx }
{