From bf1c1f8fa7f8e76dfb5f8b3f7a3454316b0cf3cb Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 19 Jan 2011 00:48:44 +0000 Subject: siunitx 2.1h (18jan11) git-svn-id: svn://tug.org/texlive/trunk@21120 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/siunitx/siunitx.dtx | 114 +++++++++++++-------- Master/texmf-dist/source/latex/siunitx/siunitx.ins | 4 +- 2 files changed, 75 insertions(+), 43 deletions(-) (limited to 'Master/texmf-dist/source/latex/siunitx') 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 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 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 %% %% It may be distributed and/or modified under the conditions of -- cgit v1.2.3