From b59c5fb47c6e19fbe71f5aa475c3ad48987f0d98 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 11 Feb 2011 01:14:49 +0000 Subject: siunitx 2.1l (10feb11) git-svn-id: svn://tug.org/texlive/trunk@21364 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/siunitx/config/siunitx-binary.cfg | 2 +- .../tex/latex/siunitx/config/siunitx-version-1.cfg | 2 +- Master/texmf-dist/tex/latex/siunitx/siunitx.sty | 55 ++++++++++++---------- 3 files changed, 33 insertions(+), 26 deletions(-) (limited to 'Master/texmf-dist/tex/latex/siunitx') 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 b143d8b23ac..7554e07dc88 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/02/01} {2.1j} +\ProvidesExplFile {siunitx-binary.cfg} {2011/02/10} {2.1l} {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 3b99f062cc7..d589b71592d 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/02/01} {2.1j} +\ProvidesExplFile {siunitx-version-1.cfg} {2011/02/10} {2.1l} {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 c4bbc25cba8..becdaf64aac 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/02/01} {2.1j} +\ProvidesExplPackage {siunitx} {2011/02/10} {2.1l} {A comprehensive (SI) units package} \cs_if_exist:NTF \msg_set:nnnn { @@ -93,7 +93,8 @@ \AtBeginDocument { \@ifpackageloaded { fontspec } { - \tl_set:Nx \c_siunitx_minus_tl { \char 8722 } + \int_const:Nn \c_siunitx_minus_int { 8722 } + \tl_set:Nn \c_siunitx_minus_tl { \char \c_siunitx_minus_int } } { } } @@ -101,9 +102,7 @@ \DeclareTextSymbolDefault \c_siunitx_mu_tl { TS1 } \AtBeginDocument { \@ifpackageloaded { fontspec } - { - \tl_set:Nx \c_siunitx_mu_tl { \char 181 } - } + { \tl_set:Nx \c_siunitx_mu_tl { \char 181 } } { } } \tl_new:N \c_siunitx_omega_tl @@ -416,11 +415,16 @@ detect-display-math .bool_set:N = \l_siunitx_detect_display_math_bool, detect-family .bool_set:N = \l_siunitx_detect_family_bool, + detect-inline-family .choice:, + detect-inline-family .value_required:, + detect-inline-family / + math .code:n = + { \tl_set:Nn \l_siunitx_detect_inline_family_tl { math } }, + detect-inline-family / + text .code:n = + { \tl_set:Nn \l_siunitx_detect_inline_family_tl { text } }, detect-inline-weight .choice:, detect-inline-weight .value_required:, - detect-inline-weight / - combined .code:n = - { \tl_set:Nn \l_siunitx_detect_inline_weight_tl { combined } }, detect-inline-weight / math .code:n = { \tl_set:Nn \l_siunitx_detect_inline_weight_tl { math } }, @@ -448,6 +452,10 @@ detect-shape .bool_set:N = \l_siunitx_detect_shape_bool, detect-weight .bool_set:N = \l_siunitx_detect_weight_bool } +\keys_set:nn { siunitx } { + detect-inline-family = text , + detect-inline-weight = text , +} \bool_new:N \l_siunitx_font_set_bool \bool_new:N \l_siunitx_font_math_mode_bool \tl_new:N \l_siunitx_font_family_tl @@ -498,10 +506,6 @@ } { \siunitx_detect_font_weight_text: } } -\cs_new_protected_nopar:Npn \siunitx_detect_font_weight_combined: { - \siunitx_detect_font_weight_math: - \siunitx_detect_font_weight_text: -} \cs_new_protected_nopar:Npn \siunitx_detect_font_weight_math: { \str_if_eq:VnT \math@version { bold } { @@ -512,10 +516,7 @@ } } \str_if_eq:VnT \math@version { light } - { - \cs_set:Npn \siunitx_font_weight: - { \lseries } - } + { \cs_set:Npn \siunitx_font_weight: { \lseries } } } \cs_new_protected_nopar:Npn \siunitx_detect_font_weight_text: { \tl_set:Nx \l_siunitx_tmpa_tl { \tl_head:V \f@series } @@ -528,21 +529,27 @@ } } \str_if_eq:VnT \l_siunitx_tmpa_tl { l } - { - \cs_set:Npn \siunitx_font_weight: - { \lseries } - } + { \cs_set:Npn \siunitx_font_weight: { \lseries } } } \cs_new_protected_nopar:Npn \siunitx_detect_font_family: { - \siunitx_detect_font_family_text: - \mode_if_math:T + \mode_if_math:TF { - \bool_if:NT \l_siunitx_display_math_bool + \bool_if:NTF \l_siunitx_display_math_bool { - \bool_if:NT \l_siunitx_detect_display_math_bool + \bool_if:NTF \l_siunitx_detect_display_math_bool { \siunitx_detect_font_family_math: } + { \siunitx_detect_font_family_text: } + } + { + \use:c + { + siunitx_detect_font_family_ + \l_siunitx_detect_inline_family_tl + : + } } } + { \siunitx_detect_font_family_text: } } \cs_new_protected_nopar:Npn \siunitx_detect_font_family_math: { \tl_set:Nn \l_siunitx_font_family_tl { rm } -- cgit v1.2.3