summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/siunitx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-12-04 23:50:18 +0000
committerKarl Berry <karl@freefriends.org>2011-12-04 23:50:18 +0000
commitb01204963fa370f342fa9c0cea761cc0af39282c (patch)
tree32db7275a34e067b80afd5b0d77656dd76740064 /Master/texmf-dist/tex/latex/siunitx
parentf8b47431f15a5df77e1d3c8f46019d9a920d97e8 (diff)
siunitx 2.4a (4dec11)
git-svn-id: svn://tug.org/texlive/trunk@24747 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.sty196
4 files changed, 144 insertions, 58 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 cdd37780dd4..b3025483296 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} {2011/11/14} {2.4}
+\ProvidesExplFile {siunitx-abbreviations.cfg} {2011/12/04} {2.4a}
{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 88f31faebf4..5a39cf52e11 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/11/14} {2.4}
+\ProvidesExplFile {siunitx-binary.cfg} {2011/12/04} {2.4a}
{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 57c10d8ab57..02ef272a822 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/11/14} {2.4}
+\ProvidesExplFile {siunitx-version-1.cfg} {2011/12/04} {2.4a}
{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 fcf188e6609..cd1396e1da6 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/11/14} {2.4}
+\ProvidesExplPackage {siunitx} {2011/12/04} {2.4a}
{A comprehensive (SI) units package}
\@ifpackagelater { expl3 } { 2011/09/05 }
{ }
@@ -306,6 +306,11 @@
\siunitx_option_deactivate_aux:n
}
\clist_new:N \l_siunitx_option_deactivate_clist
+\cs_new_protected:Npn \siunitx_option_unchanged:Nnn #1#2#3
+ {
+ \str_if_eq:VnT #1 {#2}
+ { \tl_set:Nn #1 {#3} }
+ }
\cs_generate_variant:Nn \tl_if_in:NnTF { NV }
\cs_generate_variant:Nn \tl_replace_all:Nnn { NnV }
\group_begin:
@@ -342,7 +347,9 @@
\@ifpackageloaded { tex4ht }
{
\cs_set_eq:NN \siunitx_print_text_super:n \textsuperscript
- \keys_set:nn { siunitx } { qualifier-mode = brackets, mode = text }
+ \siunitx_option_unchanged:Nnn \l_siunitx_qualifier_mode_tl
+ { subscript } { brackets }
+ \keys_set:nn { siunitx } { mode = text }
}
{ }
}
@@ -688,17 +695,32 @@
{
\@ifpackageloaded { cmbright }
{ }
- { \keys_set:nn { siunitx } { math-rm = \mathsf } }
+ {
+ \cs_set:Npn \siunitx_tmp:w ##1 { \mathrm {#1} }
+ \cs_if_eq:NNT \siunitx_number_mathrm:n \siunitx_tmp:w
+ { \keys_set:nn { siunitx } { number-math-rm = \mathsf } }
+ \cs_if_eq:NNT \siunitx_unit_mathrm:n \siunitx_tmp:w
+ { \keys_set:nn { siunitx } { unit-math-rm = \mathsf } }
+ }
}
- \keys_set:nn { siunitx } { text-rm = \sffamily }
+ \cs_set:Npn \siunitx_tmp:w { \rmfamily }
+ \cs_if_eq:NNT \siunitx_number_textrm:n \siunitx_tmp:w
+ { \keys_set:nn { siunitx } { number-text-rm = \sffamily } }
+ \cs_if_eq:NNT \siunitx_unit_textrm:n \siunitx_tmp:w
+ { \keys_set:nn { siunitx } { unit-text-rm = \sffamily } }
}
\tl_if_eq:NNT \l_siunitx_tmpa_tl \c_siunitx_texttt_tl
{
- \keys_set:nn { siunitx }
- {
- math-rm = \mathtt,
- text-rm = \ttfamily
- }
+ \cs_set:Npn \siunitx_tmp:w ##1 { \mathrm {#1} }
+ \cs_if_eq:NNT \siunitx_number_mathrm:n \siunitx_tmp:w
+ { \keys_set:nn { siunitx } { number-math-rm = \mathtt } }
+ \cs_if_eq:NNT \siunitx_unit_mathrm:n \siunitx_tmp:w
+ { \keys_set:nn { siunitx } { unit-math-rm = \mathtt } }
+ \cs_set:Npn \siunitx_tmp:w { \rmfamily }
+ \cs_if_eq:NNT \siunitx_number_textrm:n \siunitx_tmp:w
+ { \keys_set:nn { siunitx } { number-text-rm = \ttfamily } }
+ \cs_if_eq:NNT \siunitx_unit_textrm:n \siunitx_tmp:w
+ { \keys_set:nn { siunitx } { unit-text-rm = \ttfamily } }
}
}
\tl_new:N \l_siunitx_print_arg_tl
@@ -4659,14 +4681,19 @@
\cs_new_protected:Npn \siunitx_unit_format_literal_power:n #1
{ \PrintSuperscript { \siunitx_unit_format_power_aux:n {#1} } }
%\end{macro}
-\cs_new_protected:Npn \siunitx_unit_format_literal_extras: {
- \siunitx_unit_format_literal_extras_aux:nN { 176 }
- \SIUnitSymbolDegree
- \siunitx_unit_format_literal_extras_aux:nN { 181 }
- \SIUnitSymbolMicro
- \siunitx_unit_format_literal_extras_aux:nN { 197 }
- \SIUnitSymbolAngstrom
-}
+\cs_new_protected:Npn \siunitx_unit_format_literal_extras:
+ {
+ \siunitx_unit_format_literal_extras_aux:nN { 176 }
+ \SIUnitSymbolDegree
+ \siunitx_unit_format_literal_extras_aux:nN { 181 }
+ \SIUnitSymbolMicro
+ \siunitx_unit_format_literal_extras_aux:nN { 197 }
+ \SIUnitSymbolAngstrom
+ \siunitx_unit_format_literal_extras_aux:nN { 8451 }
+ \SIUnitSymbolCelsius
+ \siunitx_unit_format_literal_extras_aux:nN { 8486 }
+ \SIUnitSymbolOhm
+ }
\cs_new_protected:Npn
\siunitx_unit_format_literal_extras_aux:nN #1#2 {
\char_set_lccode:nn { `\@ } {#1}
@@ -6536,44 +6563,55 @@
table-figures-decimal = 2,
table-figures-integer = 3
}
-\keys_define:nn { siunitx } {
- redefine-symbols .bool_set:N = \l_siunitx_redefine_symbols_bool,
-}
-\keys_set:nn { siunitx } {
- redefine-symbols = true
-}
-\AtBeginDocument {
- \bool_if:NT \l_siunitx_redefine_symbols_bool
- {
- \@ifpackageloaded { textcomp }
- {
- \keys_set:nn { siunitx }
- {
- math-degree = \text { \textdegree },
- text-degree = \textdegree,
- }
- \@ifpackageloaded { mathptmx } { }
- {
- \keys_set:nn { siunitx } { text-micro = \textmu }
- \@ifpackageloaded { fourier } { }
- { \keys_set:nn { siunitx } { text-ohm = \textohm } }
- }
- \str_if_eq:VnT \encodingdefault { OT1 }
- {
- \keys_set:nn { siunitx }
- {
- math-angstrom = \text { \capitalring { A } },
- text-angstrom = \capitalring { A }
- }
- }
- } { }
- \@ifpackageloaded { upgreek }
- {
- \keys_set:nn { siunitx }
- { math-ohm = \Upomega }
- } { }
- }
-}
+\keys_define:nn { siunitx }
+ { redefine-symbols .bool_set:N = \l_siunitx_redefine_symbols_bool }
+\keys_set:nn { siunitx } { redefine-symbols = true }
+\AtBeginDocument
+ {
+ \bool_if:NT \l_siunitx_redefine_symbols_bool
+ {
+ \@ifpackageloaded { textcomp }
+ {
+ \siunitx_option_unchanged:Nnn \l_siunitx_degree_math_tl
+ { { } ^ { \circ } }
+ { \text { \textdegree } }
+ \siunitx_option_unchanged:Nnn \l_siunitx_degree_text_tl
+ { \ensuremath { { } ^ { \circ } } }
+ { \textdegree }
+ \@ifpackageloaded { mathptmx }
+ { }
+ {
+ \siunitx_option_unchanged:Nnn \l_siunitx_micro_text_tl
+ { \c_siunitx_mu_tl }
+ { \textmu }
+ \@ifpackageloaded { fourier }
+ { }
+ {
+ \siunitx_option_unchanged:Nnn \l_siunitx_ohm_text_tl
+ { \ensuremath { \c_siunitx_omega_tl } }
+ { \textohm }
+ }
+ }
+ \str_if_eq:VnT \encodingdefault { OT1 }
+ {
+ \siunitx_option_unchanged:Nnn \l_siunitx_angstrom_math_tl
+ { \text { \AA } }
+ { \text { \capitalring { A } } }
+ \siunitx_option_unchanged:Nnn \l_siunitx_angstrom_text_tl
+ { \AA }
+ { \capitalring { A } }
+ }
+ }
+ { }
+ \@ifpackageloaded { upgreek }
+ {
+ \siunitx_option_unchanged:Nnn \l_siunitx_ohm_math_tl
+ { \text { \ensuremath { \c_siunitx_omega_tl } } }
+ { \Upomega }
+ }
+ { }
+ }
+ }
\keys_define:nn { siunitx } {
math-angstrom .tl_set:N = \l_siunitx_angstrom_math_tl,
math-arcminute .tl_set:N = \l_siunitx_arcminute_math_tl,
@@ -6626,6 +6664,54 @@
\siunitx_symbol_new:n { Degree }
\siunitx_symbol_new:n { Micro }
\siunitx_symbol_new:n { Ohm }
+\pdftex_if_engine:F
+ {
+ \AtBeginDocument
+ {
+ \@ifpackageloaded { fontspec }
+ {
+ \int_const:Nn \c_siunitx_degree_int { 176 }
+ \int_const:Nn \c_siunitx_micro_int { 181 }
+ \int_const:Nn \c_siunitx_angstrom_int { 197 }
+ \int_const:Nn \c_siunitx_celsius_int { 8451 }
+ \int_const:Nn \c_siunitx_ohm_int { 8486 }
+ \siunitx_option_unchanged:Nnn \l_siunitx_angstrom_math_tl
+ { \text { \AA } }
+ { \tex_char:D \c_siunitx_angstrom_int }
+ \siunitx_option_unchanged:Nnn \l_siunitx_celsius_math_tl
+ { { } ^ { \circ } \kern - \scriptspace \text { C } }
+ { \tex_char:D \c_siunitx_celsius_int }
+ \siunitx_option_unchanged:Nnn \l_siunitx_degree_math_tl
+ { { } ^ { \circ } }
+ { \tex_char:D \c_siunitx_degree_int }
+ \siunitx_option_unchanged:Nnn \l_siunitx_micro_math_tl
+ { \text { \c_siunitx_mu_tl } }
+ { \tex_char:D \c_siunitx_micro_int }
+ \siunitx_option_unchanged:Nnn \l_siunitx_ohm_math_tl
+ { \text { \ensuremath { \c_siunitx_omega_tl } } }
+ { \tex_char:D \c_siunitx_ohm_int }
+ \siunitx_option_unchanged:Nnn \l_siunitx_angstrom_text_tl
+ { \AA }
+ { \tex_char:D \c_siunitx_angstrom_int }
+ \siunitx_option_unchanged:Nnn \l_siunitx_celsius_text_tl
+ {
+ \ensuremath
+ { { } ^ { \circ } \kern - \scriptspace \text { C } }
+ }
+ { \tex_char:D \c_siunitx_celsius_int }
+ \siunitx_option_unchanged:Nnn \l_siunitx_degree_text_tl
+ { \ensuremath { { } ^ { \circ } } }
+ { \tex_char:D \c_siunitx_degree_int }
+ \siunitx_option_unchanged:Nnn \l_siunitx_micro_text_tl
+ { \c_siunitx_mu_tl }
+ { \tex_char:D \c_siunitx_micro_int }
+ \siunitx_option_unchanged:Nnn \l_siunitx_ohm_text_tl
+ { \ensuremath { \c_siunitx_omega_tl } }
+ { \tex_char:D \c_siunitx_ohm_int }
+ }
+ { }
+ }
+ }
\clist_new:N \l_siunitx_pgf_link_clist
\cs_new_protected:Npn \siunitx_pgf_link: {
\clist_clear:N \l_siunitx_pgf_link_clist