summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/siunitx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-03-31 22:38:47 +0000
committerKarl Berry <karl@freefriends.org>2012-03-31 22:38:47 +0000
commit8a59aa6a525449e470ad9a75ecc5f5dc5f004d01 (patch)
treeb507df4a42942accf32b9d16b9ec02e5437edcee /Master/texmf-dist/tex/latex/siunitx
parentda832dbee16e521f4f3af3fec1c6f8a855de1263 (diff)
siunitx (24mar12)
git-svn-id: svn://tug.org/texlive/trunk@25805 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.sty159
4 files changed, 90 insertions, 75 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 e81f3b35e9b..ad1dfe2b15e 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/01/26} {2.4j}
+\ProvidesExplFile {siunitx-abbreviations.cfg} {2012/03/23} {2.4l}
{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 db4e7089efc..2d0d4cdbc53 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/01/26} {2.4j}
+\ProvidesExplFile {siunitx-binary.cfg} {2012/03/23} {2.4l}
{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 ba4fe0c6e44..535d1197b4d 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/01/26} {2.4j}
+\ProvidesExplFile {siunitx-version-1.cfg} {2012/03/23} {2.4l}
{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 b530cd1c590..ea3050bf5ab 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/01/26} {2.4j}
+\ProvidesExplPackage {siunitx} {2012/03/23} {2.4l}
{A comprehensive (SI) units package}
\@ifpackagelater { expl3 } { 2011/09/05 }
{ }
@@ -773,6 +773,20 @@
\cs_new_eq:NN \siunitx_textcolor:n \use_none:n
}
}
+\cs_new_protected:Npn \siunitx_print_math:
+ {
+ \cs_set_eq:NN \PrintSubscript \sb
+ \cs_set_eq:NN \PrintSuperscript \sp
+ \ensuremath
+ {
+ \use:c
+ {
+ siunitx_ \l_siunitx_print_type_tl _
+ math \l_siunitx_font_family_tl :n
+ }
+ { \l_siunitx_print_arg_tl }
+ }
+ }
\group_begin:
\char_set_lccode:nn { `\@ } { `\_ }
\char_set_catcode_math_subscript:N \@
@@ -780,21 +794,7 @@
\char_set_catcode_active:N \!
\tl_to_lowercase:n {
\group_end:
- \cs_set_protected:Npn \siunitx_print_math:
- {
- \cs_set_eq:NN \PrintSubscript @
- \cs_set_eq:NN \PrintSuperscript ^
- \ensuremath
- {
- \use:c
- {
- siunitx_ \l_siunitx_print_type_tl _
- math \l_siunitx_font_family_tl :n
- }
- { \l_siunitx_print_arg_tl }
- }
- }
- \cs_set_protected:Npn \siunitx_print_text:
+ \cs_new_protected:Npn \siunitx_print_text:
{
\tl_replace_all:Nnn \l_siunitx_print_arg_tl { - }
{ \c_siunitx_minus_tl }
@@ -809,32 +809,26 @@
\l_siunitx_print_arg_tl
}
}
-\group_begin:
- \char_set_lccode:nn { `\@ } { `\_ }
- \char_set_catcode_math_subscript:N \@
-\tl_to_lowercase:n {
- \group_end:
- \cs_set_protected:Npn \siunitx_print_text_sub:n #1
- {
- \cs_set:Npn \siunitx_print_text_sub_super:n ##1
- {
- \ensuremath
- {
- @ { \text {#1} }
- ^ { \text {##1} }
+\cs_new_protected:Npn \siunitx_print_text_sub:n #1
+ {
+ \cs_set:Npn \siunitx_print_text_sub_super:n ##1
+ {
+ \ensuremath
+ {
+ \sb { \text {#1} }
+ \sp { \text {##1} }
}
- }
- \cs_set_eq:NN \l_peek_search_token \siunitx_print_text_super:n
- \cs_set:Npn \peek_true:w
- {
- \tex_afterassignment:D \peek_true_aux:w
- \cs_set_eq:NN \peek_tmp:w
- }
- \cs_set:Npn \peek_true_aux:w { \siunitx_print_text_sub_super:n }
- \cs_set:Npn \peek_false:w { \ensuremath { @ { \text {#1} } } }
- \peek_after:Nw \peek_execute_branches_meaning:
- }
-}
+ }
+ \cs_set_eq:NN \l_peek_search_token \siunitx_print_text_super:n
+ \cs_set:Npn \peek_true:w
+ {
+ \tex_afterassignment:D \peek_true_aux:w
+ \cs_set_eq:NN \peek_tmp:w
+ }
+ \cs_set:Npn \peek_true_aux:w { \siunitx_print_text_sub_super:n }
+ \cs_set:Npn \peek_false:w { \ensuremath { \sb { \text {#1} } } }
+ \peek_after:Nw \peek_execute_branches_meaning:
+ }
\cs_new_protected:Npn \siunitx_print_text_sub_super:n { }
\cs_new_protected:Npn \siunitx_print_text_super:n #1 {
\tl_set:Nn \l_siunitx_tmpa_tl {#1}
@@ -843,9 +837,7 @@
\tl_set:Nx \l_siunitx_tmpa_tl
{
\exp_not:N \ensuremath
- {
- ^ { \exp_not:N \text { \exp_not:V \l_siunitx_tmpa_tl } }
- }
+ { \sp { \exp_not:N \text { \exp_not:V \l_siunitx_tmpa_tl } } }
}
\l_siunitx_tmpa_tl
}
@@ -1748,6 +1740,7 @@
add-integer-zero = true,
retain-unity-mantissa = true,
round-half = up,
+ round-minimum = 0,
round-precision = 2
}
\cs_new_protected:Npn \siunitx_number_process:
@@ -2387,7 +2380,7 @@
}
= \c_zero
{
- \fp_compare:nNnTF { \l_siunitx_process_round_min_tl } = { 0 }
+ \str_if_eq:VnTF \l_siunitx_process_round_min_tl { 0 }
{
\prop_put:Nnn \l_siunitx_number_in_prop { #1 -integer } { 0 }
\prop_put:NnV \l_siunitx_number_in_prop { #1 -decimal }
@@ -4112,29 +4105,53 @@
unit-optional-argument ,
use-xspace ,
}
-\cs_new_protected:Npn \siunitx_unit_create_empty_functions: {
- \seq_map_function:NN \l_siunitx_declare_list_seq
- \siunitx_unit_create_empty_functions_aux:N
-}
-\cs_new_protected:Npn
- \siunitx_unit_create_empty_functions_aux:N #1 {
- \cs_if_free:NT #1 { \cs_set_protected:Npn #1 { \ERROR } }
-}
-\cs_new_protected:Npn \siunitx_unit_create_functions: {
- \bool_if:NT \l_siunitx_create_overwrite_bool
- { \seq_map_function:NN \l_siunitx_declare_list_seq \cs_undefine:N }
- \bool_if:NTF \l_siunitx_create_optional_bool
- {
- \seq_map_function:NN \l_siunitx_declare_list_seq
- \siunitx_unit_create_with_arg:N
- }
- {
- \seq_map_function:NN \l_siunitx_declare_list_seq
- \siunitx_unit_create:N
- }
- \bool_if:NT \l_siunitx_create_xspace_bool
- { \RequirePackage { xspace } }
-}
+\cs_new_protected_nopar:Npn \siunitx_unit_create_empty_functions:
+ {
+ \siunitx_unit_create_functions_aux_i:
+ \seq_map_function:NN \l_siunitx_declare_list_seq
+ \siunitx_unit_create_empty_functions_aux:N
+ \siunitx_unit_create_functions_aux_ii:
+ }
+\cs_new_protected:Npn \siunitx_unit_create_empty_functions_aux:N #1
+ {
+ \cs_if_free:NT #1
+ { \cs_set_protected:Npn #1 { \ERROR } }
+ }
+\cs_new_protected_nopar:Npn \siunitx_unit_create_functions:
+ {
+ \siunitx_unit_create_functions_aux_i:
+ \bool_if:NT \l_siunitx_create_overwrite_bool
+ { \seq_map_function:NN \l_siunitx_declare_list_seq \cs_undefine:N }
+ \bool_if:NTF \l_siunitx_create_optional_bool
+ {
+ \seq_map_function:NN \l_siunitx_declare_list_seq
+ \siunitx_unit_create_with_arg:N
+ }
+ {
+ \seq_map_function:NN \l_siunitx_declare_list_seq
+ \siunitx_unit_create:N
+ }
+ \siunitx_unit_create_functions_aux_ii:
+ \bool_if:NT \l_siunitx_create_xspace_bool
+ { \RequirePackage { xspace } }
+ }
+\cs_new_protected_nopar:Npn \siunitx_unit_create_functions_aux_i:
+ {
+ \@ifpackageloaded { soulpos }
+ {
+ \@ifpackageloaded { soul }
+ { }
+ {
+ \cs_set_protected_nopar:Npn \siunitx_unit_create_functions_aux_ii:
+ {
+ \cs_undefine:N \hl
+ \cs_undefine:N \ul
+ }
+ }
+ }
+ { }
+ }
+\cs_new_protected_nopar:Npn \siunitx_unit_create_functions_aux_ii: { }
\cs_new_protected:Npn \siunitx_unit_create:N #1 {
\cs_if_free:NT #1
{
@@ -5239,8 +5256,6 @@
{ \siunitx_list_numbers_aux:nn #1 }
{ \siunitx_combined_output:n {#1} }
}
- \tl_put_right:NV \l_siunitx_list_tl \l_siunitx_list_separator_final_tl
- \tl_put_right:NV \l_siunitx_list_tl \l_siunitx_list_current_tl
}
\cs_new_protected:Npn \siunitx_list_numbers_aux_ii:n #1
{
@@ -7343,8 +7358,8 @@
\sisetup
{
list-final-separator = { ~ \translate { and } ~ },
- range-phrase =
- { ~ \translate { to~(numerical~range) } ~ },
+ list-pair-separator = { ~ \translate { and } ~ },
+ range-phrase = { ~ \translate { to~(numerical~range) } ~ }
}
}
\tl_const:Nn \c_siunitx_configuration_ext_tl { cfg }