summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/siunitx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-01-19 00:48:44 +0000
committerKarl Berry <karl@freefriends.org>2011-01-19 00:48:44 +0000
commitbf1c1f8fa7f8e76dfb5f8b3f7a3454316b0cf3cb (patch)
tree649b6cad296e7e4a25b59a59ba8d34db31f38db4 /Master/texmf-dist/tex/latex/siunitx
parent253a576fcd7a1b4f2e531719e79f7f8c98be2791 (diff)
siunitx 2.1h (18jan11)
git-svn-id: svn://tug.org/texlive/trunk@21120 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.cfg4
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/config/siunitx-version-1.cfg4
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/siunitx.sty53
4 files changed, 45 insertions, 18 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 369783744d3..219f0305d0e 100644
--- a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviations.cfg
+++ b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviations.cfg
@@ -93,7 +93,7 @@
\DeclareSIUnit \us { \micro \second }
\DeclareSIUnit \ms { \milli \second }
%%
-%% Copyright (C) 2008-2010 by
+%% Copyright (C) 2008-2011 by
%% Joseph Wright <joseph.wright@morningstar2.co.uk>
%%
%% It may be distributed and/or modified under the conditions of
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 1651286f8e1..7a22ac6bf38 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/11/24} {2.1f}
+\ProvidesExplFile {siunitx-binary.cfg} {2011/01/18} {2.1h}
{siunitx: Binary units}
\DeclareBinaryPrefix \kibi { Ki } { 10 }
\DeclareBinaryPrefix \mebi { Mi } { 20 }
@@ -26,7 +26,7 @@
\DeclareSIUnit \bit { bit }
\DeclareSIUnit \byte { B }
%%
-%% Copyright (C) 2008-2010 by
+%% Copyright (C) 2008-2011 by
%% Joseph Wright <joseph.wright@morningstar2.co.uk>
%%
%% It may be distributed and/or modified under the conditions of
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 2d203b33132..c39f1961ae4 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/11/24} {2.1f}
+\ProvidesExplFile {siunitx-version-1.cfg} {2011/01/18} {2.1h}
{siunitx: Version 1 settings}
\keys_set:nn { siunitx }
{ load-configurations = { abbreviations , binary } }
@@ -743,7 +743,7 @@
{ \keys_set:nn { siunitx } { load-configurations = chemistry } }
}
%%
-%% Copyright (C) 2008-2010 by
+%% Copyright (C) 2008-2011 by
%% Joseph Wright <joseph.wright@morningstar2.co.uk>
%%
%% It may be distributed and/or modified under the conditions of
diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
index 272ca6f6e03..c018305d3b2 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/11/24} {2.1f}
+\ProvidesExplPackage {siunitx} {2011/01/18} {2.1h}
{A comprehensive (SI) units package}
\cs_if_exist:NTF \msg_set:nnnn
{
@@ -365,6 +365,30 @@
}
{ }
}
+\prg_new_conditional:Npnn \siunitx_if_display_math: { T , F , TF , p }
+ {
+ \mode_if_inner:TF
+ { \prg_return_false: }
+ { \prg_return_true: }
+}
+\AtBeginDocument {
+ \cs_if_exist:NT \if@display
+ {
+ \prg_set_conditional:Npnn \siunitx_if_display_math:
+ { T , F , TF , p }
+ {
+ \mode_if_inner:TF
+ {
+ \if@display
+ \prg_return_true:
+ \tex_else:D
+ \prg_return_false:
+ \tex_fi:D
+ }
+ { \prg_return_true: }
+ }
+ }
+}
\cs_new_protected_nopar:Npn \siunitx_set_math_fam:n #1 {
\int_new:c { c_siunitx_math #1 _int }
\group_begin:
@@ -478,7 +502,12 @@
\cs_new_protected_nopar:Npn \siunitx_detect_font_weight: {
\mode_if_math:TF
{
- \mode_if_inner:TF
+ \siunitx_if_display_math:TF
+ {
+ \bool_if:NTF \l_siunitx_detect_display_math_bool
+ { \siunitx_detect_font_weight_math: }
+ { \siunitx_detect_font_weight_text: }
+ }
{
\use:c
{
@@ -487,11 +516,6 @@
:
}
}
- {
- \bool_if:NTF \l_siunitx_detect_display_math_bool
- { \siunitx_detect_font_weight_math: }
- { \siunitx_detect_font_weight_text: }
- }
}
{ \siunitx_detect_font_weight_text: }
}
@@ -532,10 +556,13 @@
}
\cs_new_protected_nopar:Npn \siunitx_detect_font_family: {
\siunitx_detect_font_family_text:
- \bool_if:NT \l_siunitx_detect_display_math_bool
+ \mode_if_math:T
{
- \mode_if_math:T
- { \mode_if_inner:F { \siunitx_detect_font_family_math: } }
+ \bool_if:NT \l_siunitx_detect_display_math_bool
+ {
+ \siunitx_if_display_math:T
+ { \siunitx_detect_font_family_math: }
+ }
}
}
\cs_new_protected_nopar:Npn \siunitx_detect_font_family_math: {
@@ -3829,9 +3856,9 @@
\bool_if:NT \l_siunitx_per_auto_bool
{
\tl_set:Nn \l_siunitx_per_mode_tl { symbol }
- \mode_if_inner:F
+ \mode_if_math:T
{
- \mode_if_math:T
+ \siunitx_if_display_math:T
{
\tl_set:Nn \l_siunitx_per_mode_tl
{ fraction }
@@ -6592,7 +6619,7 @@
}
\ProcessKeysOptions { siunitx }
%%
-%% Copyright (C) 2008-2010 by
+%% Copyright (C) 2008-2011 by
%% Joseph Wright <joseph.wright@morningstar2.co.uk>
%%
%% It may be distributed and/or modified under the conditions of