summaryrefslogtreecommitdiff
path: root/Master
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
parent253a576fcd7a1b4f2e531719e79f7f8c98be2791 (diff)
siunitx 2.1h (18jan11)
git-svn-id: svn://tug.org/texlive/trunk@21120 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/siunitx/README2
-rw-r--r--Master/texmf-dist/doc/latex/siunitx/siunitx.pdfbin517545 -> 518995 bytes
-rw-r--r--Master/texmf-dist/source/latex/siunitx/siunitx.dtx114
-rw-r--r--Master/texmf-dist/source/latex/siunitx/siunitx.ins4
-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
8 files changed, 121 insertions, 62 deletions
diff --git a/Master/texmf-dist/doc/latex/siunitx/README b/Master/texmf-dist/doc/latex/siunitx/README
index 1c0451b51a0..1230a473093 100644
--- a/Master/texmf-dist/doc/latex/siunitx/README
+++ b/Master/texmf-dist/doc/latex/siunitx/README
@@ -35,7 +35,7 @@ typeset the documentation.
The package requires LaTeX3 support as provided in the expl3
and xpackages bundles. Both of these are available on CTAN
(http://www.ctan.org/) as ready-to-install zip files. Suitable
-versions are available in MiKTeX 2.8 and TeX Live 2010
+versions are available in MiKTeX 2.9 and TeX Live 2010
(updating the relevant packages online may be necessary).
LaTeX3, and so siunitx, requires the e-TeX extensions: these
are available on all modern TeX systems.
diff --git a/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf b/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf
index a40e5404264..e600bcdc8c1 100644
--- a/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf
+++ b/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
index e99a47995d0..4155a8f510f 100644
--- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
+++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
@@ -40,7 +40,7 @@ typeset the documentation.
The package requires LaTeX3 support as provided in the expl3
and xpackages bundles. Both of these are available on CTAN
(http://www.ctan.org/) as ready-to-install zip files. Suitable
-versions are available in MiKTeX 2.8 and TeX Live 2010
+versions are available in MiKTeX 2.9 and TeX Live 2010
(updating the relevant packages online may be necessary).
LaTeX3, and so siunitx, requires the e-TeX extensions: these
are available on all modern TeX systems.
@@ -87,7 +87,7 @@ See http://www.latex-project.org/lppl.txt
\endpreamble
\postamble
-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
@@ -525,6 +525,7 @@ This work consists of the file siunitx.dtx
% \opt{unit-optional-argument} implementation corrected}
%\changes{v2.1g}{2010/12/21}{Checks on the versions of \pkg{expl3} and
% \pkg{xparse} installed}
+%\changes{v2.1h}{2011/01/18}{Detect AMS display-like environments}
%
%\begin{abstract}
% Typesetting values with units requires care to ensure that the
@@ -579,7 +580,7 @@ This work consists of the file siunitx.dtx
% The package requires \LaTeX3 support as provided in the
% \pkg{expl3} and \pkg{xpackages} bundles. Both of these are available
% on \href{http://www.ctan.org}{\textsc{ctan}} as ready-to-install
-% zip files. Suitable versions are available in MiK\TeX~2.8 and
+% zip files. Suitable versions are available in MiK\TeX~2.9 and
% \TeX~Live 2010 (updating the relevant packages online may be
% necessary). \LaTeX3, and so \pkg{siunitx}, requires the \eTeX\
% extensions: these are available on all modern \TeX\ systems.
@@ -1384,7 +1385,10 @@ This work consists of the file siunitx.dtx
% independently from the body of the document. Thus the local
% \emph{math} font is checked for matching. In contrast, when set
% \opt{false}, display material is treated with the current running
-% text font.
+% text font.\footnote{Here, \enquote{display} math means either typeset
+% in \TeX's display math mode or using the AMS display-like
+% environments. Simply using \cs{displaystyle} will not make otherwise
+% in line math be detected as display math.}
%\begin{LaTeXdemo}
% \sffamily
% Some text
@@ -2044,7 +2048,7 @@ This work consists of the file siunitx.dtx
%\DescribeOption{quotient-mode}
% For quotients, there is the possibility to print output either using
% a slash, or using the \cs{frac} macro. This is controlled by the
-% \opt{quotient} choice option, which takes values \opt{slash} and
+% \opt{quotient} choice option, which takes values \opt{symbol} and
% \opt{fraction}.
%\begin{LaTeXdemo}
% \num{1 / 2e4} \\
@@ -2557,7 +2561,11 @@ This work consists of the file siunitx.dtx
% to depend on the surrounding environment. Setting the option to
% \opt{symbol-or-fraction}, causes the same behaviour as
% \opt{symbol} when the surroundings are in line, and the same
-% behaviour as \opt{fraction} when in a display context.
+% behaviour as \opt{fraction} when in a display context.\footnote{Here,
+% \enquote{display} means either typeset in \TeX's display math mode or
+% using the AMS display-like environments. Simply using
+% \cs{displaystyle} will not make otherwise in line math be detected as
+% display material.}
%\begin{LaTeXdemo}
% \sisetup{per-mode = symbol-or-fraction}%
% \( \si{\joule\per\mole\per\kelvin} \)
@@ -2852,7 +2860,7 @@ This work consists of the file siunitx.dtx
% S[table-number-alignment = right]
% }
% \toprule
-% {Some Values} & {Some Values} & {Some Values} & {Some Values} \\
+% *4 {Some Values} \\
% \midrule
% 2.3456 & 2.3456 & 2.3456 & 2.3456 \\
% 34.2345 & 34.2345 & 34.2345 & 34.2345 \\
@@ -2908,12 +2916,7 @@ This work consists of the file siunitx.dtx
% S[table-figures-exponent = 1]
% }
% \toprule
-% {Values}
-% & {Values}
-% & {Values}
-% & {Values}
-% & {Values}
-% & {Values} \\
+% *6 {Values} \\
% \midrule
% 2.3 & 2.3 & 2.3(5) & 2.3(5) & 2.3 & 2.3e8 \\
% 34.23 & 34.23 & 34.23(4) & 34.23(4) & 34.23 & 34.23 \\
@@ -2943,8 +2946,7 @@ This work consists of the file siunitx.dtx
% S[table-comparator = true]
% }
% \toprule
-% {Values}
-% & {Values} \\
+% *2 {Values} \\
% \midrule
% 2.3 & < 2.3e8 \\
% 34.23 & = 34.23 \\
@@ -3013,11 +3015,7 @@ This work consists of the file siunitx.dtx
% S[table-format = 2.2e1]
% }
% \toprule
-% {Values}
-% & {Values}
-% & {Values}
-% & {Values}
-% & {Values} \\
+% *5 {Values} \\
% \midrule
% 2.3 & 2.3 & 2.3(5) & 2.3 & 2.3e8 \\
% 34.23 & 34.23 & 34.23(4) & 34.23 & 34.23 \\
@@ -3160,7 +3158,7 @@ This work consists of the file siunitx.dtx
% S[table-align-text-post = false]
% }
% \toprule
-% {Values} & {Values} \\
+% *2 {Values} \\
% \midrule
% 2.3456 & 2.3456 \\
% 34.234 \NoteMark{a} & 34.234 \NoteMark{a} \\
@@ -3265,9 +3263,7 @@ This work consists of the file siunitx.dtx
% S[table-text-alignment = right]
% }
% \toprule
-% {Values}
-% & {Values}
-% & {Values} \\
+% *3 {Values} \\
% \midrule
% 992.435 & 992.435 & 992.435 \\
% 7734.2344 & 7734.2344 & 7734.2344 \\
@@ -4409,7 +4405,7 @@ This work consists of the file siunitx.dtx
%
% The usual preliminaries.
% \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2010/11/24} {2.1f}
+\ProvidesExplPackage {siunitx} {2011/01/18} {2.1h}
{A comprehensive (SI) units package}
% \end{macrocode}
%
@@ -4916,6 +4912,39 @@ This work consists of the file siunitx.dtx
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\siunitx_if_display_math_p:}
+%\begin{macro}[TF]{\siunitx_if_display_math:}
+% The AMS display environments are not actually in display mode, so
+% there needs to be some code to pick this up.
+% \begin{macrocode}
+\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: }
+ }
+ }
+}
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%
%\subsection{Font detection}
%
% A number of controls and tests are needed to control the font used
@@ -5130,7 +5159,12 @@ This work consists of the file siunitx.dtx
\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
{
@@ -5139,11 +5173,6 @@ This work consists of the file siunitx.dtx
:
}
}
- {
- \bool_if:NTF \l_siunitx_detect_display_math_bool
- { \siunitx_detect_font_weight_math: }
- { \siunitx_detect_font_weight_text: }
- }
}
{ \siunitx_detect_font_weight_text: }
}
@@ -5201,10 +5230,13 @@ This work consists of the file siunitx.dtx
% \begin{macrocode}
\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_inner:F { \siunitx_detect_font_family_math: } }
+ \mode_if_math:T
+ {
+ \bool_if:NT \l_siunitx_detect_display_math_bool
+ {
+ \siunitx_if_display_math:T
+ { \siunitx_detect_font_family_math: }
+ }
}
}
% \end{macrocode}
@@ -10077,10 +10109,10 @@ This work consists of the file siunitx.dtx
\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 }
}
@@ -14460,7 +14492,7 @@ This work consists of the file siunitx.dtx
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplFile {siunitx-version-1.cfg} {2010/11/24} {2.1f}
+\ProvidesExplFile {siunitx-version-1.cfg} {2011/01/18} {2.1h}
{siunitx: Version 1 settings}
% \end{macrocode}
%
@@ -15741,7 +15773,7 @@ This work consists of the file siunitx.dtx
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplFile {siunitx-binary.cfg} {2010/11/24} {2.1f}
+\ProvidesExplFile {siunitx-binary.cfg} {2011/01/18} {2.1h}
{siunitx: Binary units}
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.ins b/Master/texmf-dist/source/latex/siunitx/siunitx.ins
index e6388ab7554..d0e0d4c6776 100644
--- a/Master/texmf-dist/source/latex/siunitx/siunitx.ins
+++ b/Master/texmf-dist/source/latex/siunitx/siunitx.ins
@@ -28,7 +28,7 @@ See http://www.latex-project.org/lppl.txt
\endpreamble
\postamble
-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
@@ -60,7 +60,7 @@ This work consists of the file siunitx.dtx
}
\endbatchfile
%%
-%% 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-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