summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/siunitx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-04-15 22:13:51 +0000
committerKarl Berry <karl@freefriends.org>2012-04-15 22:13:51 +0000
commitb19905f8cc31169f64f0a9b57820492c8bebc468 (patch)
treede15382bf85fbb4cdcec5d6e47cbb0aaa733591f /Master/texmf-dist/tex/latex/siunitx
parentbfbf8422b0b7ddff29ade25e146a04ac16f30df1 (diff)
siunitx 2.5 (15apr12)
git-svn-id: svn://tug.org/texlive/trunk@25976 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.cfg52
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/siunitx.sty129
4 files changed, 104 insertions, 81 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 987167ed270..f9b3b3dfc35 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/04} {2.4n}
+\ProvidesExplFile {siunitx-abbreviations.cfg} {2012/04/15} {2.5}
{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 22c2b4d8c40..6d09bfba075 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/04} {2.4n}
+\ProvidesExplFile {siunitx-binary.cfg} {2012/04/15} {2.5}
{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 c175f6d8922..bc483d4fdf4 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/04} {2.4n}
+\ProvidesExplFile {siunitx-version-1.cfg} {2012/04/15} {2.5}
{siunitx: Version 1 settings}
\keys_define:nn { siunitx } {
addsign .choice: ,
@@ -174,17 +174,17 @@
expproduct .choice: ,
expproduct /
cdot .meta:n =
- { exponent-product = { } \cdot { } },
+ { exponent-product = \ensuremath { { } \cdot { } } },
expproduct /
tightcdot .meta:n =
- { exponent-product = \bgroup \cdot \egroup },
+ { exponent-product = \ensuremath { \bgroup \cdot \egroup } },
expproduct /
tighttimes .meta:n =
- { exponent-product = \bgroup \times \egroup },
+ { exponent-product = \ensuremath { \bgroup \times \egroup } },
expproduct /
- times .meta:n = { exponent-product = \times },
+ times .meta:n = { exponent-product = \ensuremath { \times } },
expproduct /
- unknown .meta:n = { exponent-product = #1 },
+ unknown .meta:n = { exponent-product = \ensuremath {#1} },
fixdp .choice:,
fixdp /
false .meta:n = { round-mode = none },
@@ -517,15 +517,15 @@
unitsep .choice: ,
unitsep /
cdot .meta:n =
- { inter-unit-product = { } \cdot { } },
+ { inter-unit-product = \ensuremath { { } \cdot { } } },
unitsep /
comma .meta:n = { inter-unit-product = { {,} } },
unitsep /
fullstop .meta:n = { inter-unit-product = { { . } } },
unitsep /
- med .meta:n = { inter-unit-product = \: },
+ med .meta:n = { inter-unit-product = \ensuremath { \: } },
unitsep /
- medium .meta:n = { inter-unit-product = \: },
+ medium .meta:n = { inter-unit-product = \ensuremath { \: } },
unitsep /
none .meta:n = { inter-unit-product = },
unitsep /
@@ -535,34 +535,34 @@
unitsep /
stop .meta:n = { inter-unit-product = { { . } } },
unitsep /
- thick .meta:n = { inter-unit-product = \; },
+ thick .meta:n = { inter-unit-product = \ensuremath { \; } },
unitsep /
thin .meta:n = { inter-unit-product = \, },
unitsep /
tightcdot .meta:n =
- { inter-unit-product = \bgroup \cdot \egroup },
+ { inter-unit-product = \ensuremath { \bgroup \cdot \egroup } },
unitsep /
tighttimes .meta:n =
- { inter-unit-product = \bgroup \times \egroup },
+ { inter-unit-product = \ensuremath { \bgroup \times \egroup } },
unitsep /
- times .meta:n = { inter-unit-product = \times },
+ times .meta:n = { inter-unit-product = \ensuremath { \times } },
unitsep /
- unknown .meta:n = { inter-unit-product = #1 },
+ unknown .meta:n = { inter-unit-product = \ensuremath {#1} },
unitspace .choice: ,
unitspace /
- med .meta:n = { inter-unit-product = \: },
+ med .meta:n = { inter-unit-product = \ensuremath { \: } },
unitspace /
- medium .meta:n = { inter-unit-product = \: },
+ medium .meta:n = { inter-unit-product = \ensuremath { \: } },
unitspace /
none .meta:n = { inter-unit-product = },
unitspace /
space .meta:n = { inter-unit-product = \text { ~ } },
unitspace /
- thick .meta:n = { inter-unit-product = \; },
+ thick .meta:n = { inter-unit-product = \ensuremath { \; } },
unitspace /
thin .meta:n = { inter-unit-product = \, },
unitspace /
- unknown .meta:n = { inter-unit-product = #1 },
+ unknown .meta:n = { inter-unit-product = \ensuremath {#1} },
valuecolor .meta:n = { number-color = #1 },
valuecolour .meta:n = { number-color = #1 },
valuemathrm .meta:x =
@@ -581,15 +581,15 @@
valuesep .choice: ,
valuesep /
cdot .meta:n =
- { number-unit-product = { } \cdot { } },
+ { number-unit-product = \ensuremath { { } \cdot { } } },
valuesep /
comma .meta:n = { number-unit-product = { {,} } },
valuesep /
fullstop .meta:n = { number-unit-product = { { . } } },
valuesep /
- med .meta:n = { number-unit-product = \: },
+ med .meta:n = { number-unit-product = \ensuremath { \: } },
valuesep /
- medium .meta:n = { number-unit-product = \: },
+ medium .meta:n = { number-unit-product = \ensuremath { \: } },
valuesep /
none .meta:n = { number-unit-product = },
valuesep /
@@ -599,19 +599,19 @@
valuesep /
stop .meta:n = { number-unit-product = { { . } } },
valuesep /
- thick .meta:n = { number-unit-product = \; },
+ thick .meta:n = { number-unit-product = \ensuremath { \; } },
valuesep /
thin .meta:n = { number-unit-product = \, },
valuesep /
tightcdot .meta:n =
- { number-unit-product = \bgroup \cdot \egroup },
+ { number-unit-product = \ensuremath { \bgroup \cdot \egroup } },
valuesep /
tighttimes .meta:n =
- { number-unit-product = \bgroup \times \egroup },
+ { number-unit-product = \ensuremath { \bgroup \times \egroup } },
valuesep /
- times .meta:n = { number-unit-product = \times },
+ times .meta:n = { number-unit-product = \ensuremath { \times } },
valuesep /
- unknown .meta:n = { number-unit-product = #1 },
+ unknown .meta:n = { number-unit-product = \ensuremath {#1} },
xspace .meta:n = { use-xspace = #1 },
xspace .default:n = { true },
}
diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
index d2df5d671fe..e8dd08d9dac 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/04} {2.4n}
+\ProvidesExplPackage {siunitx} {2012/04/15} {2.5}
{A comprehensive (SI) units package}
\@ifpackagelater { expl3 } { 2011/09/05 }
{ }
@@ -101,9 +101,6 @@
\cs_new_protected:Npn \siunitx_tl_put_left_math:Nn #1#2
{ \tl_put_left:Nn #1 { \ensuremath {#2} } }
\cs_generate_variant:Nn \siunitx_tl_put_left_math:Nn { NV }
-\cs_new_protected:Npn \siunitx_tl_put_right_math:Nn #1#2
- { \tl_put_right:Nn #1 { \ensuremath {#2} } }
-\cs_generate_variant:Nn \siunitx_tl_put_right_math:Nn { NV }
\seq_new:N \c_siunitx_old_options_seq
\cs_set_protected:Npn \siunitx_tmp:w #1 {
\seq_put_right:No \c_siunitx_old_options_seq { \tl_to_str:n {#1} }
@@ -1684,7 +1681,8 @@
fixed-exponent .int_set:N = \l_siunitx_process_fixed_int,
minimum-integer-digits .int_set:N =
\l_siunitx_process_integer_min_int,
- retain-explicit-plus .bool_set:N = \l_siunitx_process_plus_tl,
+ retain-explicit-plus .bool_set:N = \l_siunitx_process_plus_bool,
+ omit-uncertainty .bool_set:N = \l_siunitx_omit_uncert_bool,
retain-unity-mantissa .bool_set:N =
\l_siunitx_process_unity_mantissa_bool,
retain-zero-exponent .bool_set:N =
@@ -1732,7 +1730,9 @@
\bool_set_false:N \l_siunitx_process_fixed_bool
\bool_set_false:N \l_siunitx_process_engineering_bool
\bool_set_true:N \l_siunitx_process_scientific_bool
- }
+ },
+ zero-decimal-to-integer .bool_set:N =
+ \l_siunitx_zero_decimal_to_integer_bool
}
\keys_set:nn { siunitx }
{
@@ -1750,22 +1750,31 @@
\siunitx_number_process_mantissa:
\prop_if_in:NnF \l_siunitx_number_in_prop { symbolic }
{
- \siunitx_number_process_exponent:
\bool_if:NTF \l_siunitx_process_fixed_bool
{ \siunitx_number_process_fixed: }
{
\bool_if:NT \l_siunitx_process_scientific_bool
{ \siunitx_number_process_scientific: }
}
+ \siunitx_number_process_exponent:
\siunitx_number_process_uncertainty:
\bool_if:NT \l_siunitx_exp_to_prefix_bool
{
\tl_if_empty:NF \l_siunitx_unit_tl
{ \siunitx_number_exp_to_prefix: }
}
- \prop_if_in:NnF \l_siunitx_number_in_prop { uncertainty }
+ \prop_if_in:NnTF \l_siunitx_number_in_prop { uncertainty }
+ {
+ \bool_if:NTF \l_siunitx_omit_uncert_bool
+ {
+ \prop_del:Nn \l_siunitx_number_in_prop { uncertainty }
+ \prop_del:Nn \l_siunitx_number_in_prop { mantissa-uncertainty }
+ }
+ { \siunitx_number_process_round: }
+ }
{ \siunitx_number_process_round: }
}
+ \siunitx_number_process_zero_to_integer:
\siunitx_number_process_integer_digits:
\bool_if:NT \l_siunitx_process_drop_exponent_bool
{
@@ -2613,7 +2622,7 @@
{ #4 - 2 }
}
\cs_new_protected:Npn \siunitx_number_process_sign: {
- \bool_if:NF \l_siunitx_process_plus_tl
+ \bool_if:NF \l_siunitx_process_plus_bool
{
\prop_if_in:NnTF \l_siunitx_number_in_prop { mantissa-sign }
{ \siunitx_number_process_sign_plus:n { mantissa } }
@@ -2760,6 +2769,34 @@
{ \prop_put:Nnn \l_siunitx_number_in_prop { #1 - #2 } { 0 } }
}
}
+\cs_new_protected_nopar:Npn \siunitx_number_process_zero_to_integer:
+ {
+ \bool_if:NT \l_siunitx_zero_decimal_to_integer_bool
+ {
+ \siunitx_number_process_zero_to_integer_aux:n { mantissa }
+ \siunitx_number_process_zero_to_integer_aux:n { complex }
+ }
+ }
+\cs_new_protected:Npn \siunitx_number_process_zero_to_integer_aux:n #1
+ {
+ \prop_get:NnNT \l_siunitx_number_in_prop { #1 -decimal } \l_siunitx_tmpa_tl
+ {
+ \bool_set_true:N \l_siunitx_tmp_bool
+ \tl_map_inline:Nn \l_siunitx_tmpa_tl
+ {
+ \str_if_eq:nnF {##1} { 0 }
+ {
+ \bool_set_false:N \l_siunitx_tmp_bool
+ \tl_map_break:
+ }
+ }
+ \bool_if:NT \l_siunitx_tmp_bool
+ {
+ \prop_del:Nn \l_siunitx_number_in_prop { #1 -decimal }
+ \prop_del:Nn \l_siunitx_number_in_prop { #1 -decimal-marker }
+ }
+ }
+ }
\cs_new_protected:Npn \siunitx_number_exp_to_prefix:
{
\prop_set_eq:NN \l_siunitx_unit_prop \l_siunitx_unit_saved_prop
@@ -3411,10 +3448,10 @@
{ \tl_set:Nn \l_siunitx_quotient_mode_tl { symbol } },
}
\keys_set:nn { siunitx } {
- fraction-function = \frac,
- output-product = \times,
- output-quotient = /,
- parse-numbers = true,
+ fraction-function = \frac ,
+ output-product = \times ,
+ output-quotient = / ,
+ parse-numbers = true ,
quotient-mode = symbol
}
\cs_new_protected:Npn \siunitx_number_output:n #1 {
@@ -4178,10 +4215,7 @@
{ l_siunitx_ \token_to_str:N #1 _options_tl }
}
\bool_if:NT \l_siunitx_create_prespace_bool
- {
- \exp_not:n
- { \ensuremath { \l_siunitx_number_unit_product_tl } }
- }
+ { \exp_not:V \l_siunitx_number_unit_product_tl }
\exp_not:n { \siunitx_unit_output:nn {#1} { } }
\group_end:
\bool_if:NT \l_siunitx_create_xspace_bool
@@ -4212,13 +4246,7 @@
\exp_not:N \IfNoValueTF {####1}
{
\bool_if:NT \l_siunitx_create_prespace_bool
- {
- \exp_not:n
- {
- \ensuremath
- { \l_siunitx_number_unit_product_tl }
- }
- }
+ { \exp_not:V \l_siunitx_number_unit_product_tl }
\exp_not:n { \siunitx_unit_output:nn {#1} { } }
}
{ \SI {####1} { \exp_not:N #1 } }
@@ -4574,12 +4602,12 @@
{ per- \int_eval:n { \l_siunitx_unit_int + 1 } }
\prop_if_in:NVF \l_siunitx_unit_prop \l_siunitx_tmpa_tl
{
- \siunitx_tl_put_right_math:NV \l_siunitx_unit_current_tl
+ \tl_put_right:NV \l_siunitx_unit_current_tl
\l_siunitx_unit_product_tl
}
}
{
- \siunitx_tl_put_right_math:NV \l_siunitx_unit_current_tl
+ \tl_put_right:NV \l_siunitx_unit_current_tl
\l_siunitx_unit_product_tl
}
}
@@ -4708,10 +4736,8 @@
\seq_map_inline:Nn \l_siunitx_declare_list_seq
{ \siunitx_unit_print_literal_aux:N ##1 }
\tl_set:Nn \l_siunitx_unit_tl {#1}
- \tl_set:Nx \l_siunitx_tmpa_tl
- { \exp_not:N \ensuremath { \exp_not:V \l_siunitx_unit_product_tl } }
- \tl_replace_all:NnV \l_siunitx_unit_tl { . } \l_siunitx_tmpa_tl
- \tl_replace_all:NnV \l_siunitx_unit_tl { ~ } \l_siunitx_tmpa_tl
+ \tl_replace_all:NnV \l_siunitx_unit_tl { . } \l_siunitx_unit_product_tl
+ \tl_replace_all:NnV \l_siunitx_unit_tl { ~ } \l_siunitx_unit_product_tl
\bool_if:NT \l_siunitx_literal_power_bool
{
\tl_replace_all:Nnn \l_siunitx_unit_tl { ^ }
@@ -4957,7 +4983,7 @@
{
\tl_if_empty:NF \l_siunitx_unit_denominator_tl
{
- \siunitx_tl_put_right_math:NV \l_siunitx_unit_tl
+ \tl_put_right:NV \l_siunitx_unit_tl
\l_siunitx_unit_product_tl
}
}
@@ -5094,14 +5120,11 @@
{
\mode_if_math:TF
{
- \ensuremath
- {
- \tex_mathchoice:D
- { \l_siunitx_number_unit_product_tl }
- { \siunitx_unit_output_number_sep_aux: }
- { \siunitx_unit_output_number_sep_aux: }
- { \siunitx_unit_output_number_sep_aux: }
- }
+ \tex_mathchoice:D
+ { \l_siunitx_number_unit_product_tl }
+ { \siunitx_unit_output_number_sep_aux: }
+ { \siunitx_unit_output_number_sep_aux: }
+ { \siunitx_unit_output_number_sep_aux: }
}
{ \siunitx_unit_output_number_sep_aux: }
}
@@ -5109,7 +5132,7 @@
}
\cs_new_protected:Npn \siunitx_unit_output_number_sep_aux: {
\bool_if:NF \l_siunitx_omit_unit_space_bool
- { \ensuremath { \l_siunitx_number_unit_product_tl } }
+ { \l_siunitx_number_unit_product_tl }
}
\cs_new_protected:Npn \siunitx_unit_output_pre_print: {
\tl_if_empty:NF \l_siunitx_pre_unit_tl
@@ -5816,7 +5839,7 @@
{ \prop_del:Nn \l_siunitx_table_model_prop { comparator } },
table-comparator /
true .code:n =
- { \prop_put:Nnn \l_siunitx_table_model_prop { comparator } { \ll } },
+ { \prop_put:Nnn \l_siunitx_table_model_prop { comparator } { > } },
table-comparator .default:n = true,
table-figures-decimal .code:n =
{
@@ -7324,23 +7347,23 @@
locale /
DE .meta:n =
{
- exponent-product = \cdot ,
- inter-unit-product = { \, } ,
- output-decimal-marker = { , } ,
+ exponent-product = \ensuremath { \cdot } ,
+ inter-unit-product = \, ,
+ output-decimal-marker = { , }
},
locale /
FR .meta:n =
{
- exponent-product = \times ,
- inter-unit-product = { \, } ,
- output-decimal-marker = { , } ,
+ exponent-product = \ensuremath { \times } ,
+ inter-unit-product = \, ,
+ output-decimal-marker = { , }
},
locale /
UK .meta:n =
{
- exponent-product = \times ,
- inter-unit-product = \, ,
- output-decimal-marker = . ,
+ exponent-product = \ensuremath { \times } ,
+ inter-unit-product = \, ,
+ output-decimal-marker = .
},
locale /
US .meta:n = { locale = UK },
@@ -7349,9 +7372,9 @@
locale /
ZA .meta:n =
{
- exponent-product = \times ,
- inter-unit-product = \cdot ,
- output-decimal-marker = { , } ,
+ exponent-product = \ensuremath { \times } ,
+ inter-unit-product = \ensuremath { \cdot } ,
+ output-decimal-marker = { , }
},
}
\file_if_exist:nT { translator.sty }