diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/siunitx/README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/siunitx/siunitx.pdf | bin | 466026 -> 470552 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/siunitx/siunitx.dtx | 419 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviations.cfg | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/siunitx/config/siunitx-binary.cfg | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/siunitx/config/siunitx-version-1.cfg | 79 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/siunitx/siunitx.sty | 189 |
7 files changed, 598 insertions, 95 deletions
diff --git a/Master/texmf-dist/doc/latex/siunitx/README b/Master/texmf-dist/doc/latex/siunitx/README index a924ef805d7..1c0451b51a0 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 2009 +versions are available in MiKTeX 2.8 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 Binary files differindex d5ceb91d94c..c613d7cfe98 100644 --- a/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf +++ b/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx index 7d26d6aa9b3..89f25d51cd8 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx +++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx @@ -41,7 +41,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 2009 +versions are available in MiKTeX 2.8 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. @@ -170,6 +170,7 @@ This work consists of the file siunitx.dtx binary, } } +\DeclareSIUnit{\KWH}{kWh} \DeclareSIPrePower\quartic{4} \DeclareSIPostPower\tothefourth{4} \DeclareSIQualifier\polymer{pol} @@ -309,7 +310,8 @@ This work consists of the file siunitx.dtx % text, % toprule, % tothe, -% volt +% volt, +% kWh, % } % }^^A %} @@ -403,6 +405,15 @@ This work consists of the file siunitx.dtx % features} %\changes{v2.0}{2010/05/23}{Introduced \cs{numlist} and \cs{SIlist} % functions} +%\changes{v2.0a}{2010/05/28}{Make \cs{SendSettingsToPgf} available +% in document body} +%\changes{v2.0a}{2010/05/28}{Fix various errors in \file{version-1} +% configuration file} +%\changes{v2.0a}{2010/05/28}{Detect use of version 1 options and +% automatically load appropriate configuration file} +%\changes{v2.0a}{2010/05/28}{Include high energy physics units in +% discussion of old configurations and in \file{version-1} +% configuration file} % %\begin{abstract} % Typesetting values with units requires care to ensure that the @@ -458,7 +469,7 @@ This work consists of the file siunitx.dtx % \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 MiKTeX 2.8 and -% TeX Live 2009 (updating the relevant packages online may be +% TeX Live 2010 (updating the relevant packages online may be % necessary). LaTeX3, and so \pkg{siunitx}, requires the e-TeX % extensions: these are available on all modern TeX systems. % @@ -2197,25 +2208,24 @@ This work consists of the file siunitx.dtx % % % Geophysics % \DeclareSIUnit\gon{gon} -%\end{LaTeXdemo} -% -%\begin{LaTeXdemo}[code only] -% % Astronomy -% \DeclareSIUnit\parse{pc} -% \DeclareSIUnit\lightyear{ly} -% -% % Chemical engineering -% \DeclareSIUnit\gmol{g\text{-}mol} -% \DeclareSIUnit\kgmol{kg\text{-}mol} -% \DeclareSIUnit\lbmol{lb\text{-}mol} % -% % Chemistry -% \DeclareSIUnit\molar{\mole\per\cubic\deci\metre} -% \DeclareSIUnit\Molar{\textsc{m}} -% \DeclareSIUnit\torr{torr} -% -% % Geophysics -% \DeclareSIUnit\gon{gon} +% % High energy physics +% \DeclareSIUnit\micron{\micro\metre} +% \DeclareSIUnit\mrad{\milli\rad} +% \DeclareSIUnit\gauss{G} +% \DeclareSIUnit\eVperc{\eV\per\clight} +% \DeclareSIUnit\nanobarn{\nano\barn} +% \DeclareSIUnit\picobarn{\pico\barn} +% \DeclareSIUnit\femtobarn{\femto\barn} +% \DeclareSIUnit\attobarn{\atto\barn} +% \DeclareSIUnit\zeptobarn{\zepto\barn} +% \DeclareSIUnit\yoctobarn{\yocto\barn} +% \DeclareSIUnit\nb{\nano\barn} +% \DeclareSIUnit\pb{\pico\barn} +% \DeclareSIUnit\fb{\femto\barn} +% \DeclareSIUnit\ab{\atto\barn} +% \DeclareSIUnit\zb{\zepto\barn} +% \DeclareSIUnit\yb{\yocto\barn} %\end{LaTeXdemo} % Users can use a local configuration file to make additional units % available on a local basis, as described in \cref{sec:config:local}. @@ -3305,6 +3315,46 @@ This work consists of the file siunitx.dtx % allows the normal use of \pkg{cellspace} with standard column types: % it does \emph{not} work with the \pkg{siunitx} \texttt{S} or % \texttt{s} columns. +% +%\subsection{Special considerations for the \cs{kWh} unit} +% +% The \file{abbreviations} configuration file provides the unit +% \cs{kWh}, which is set up with no spacing between the +% \enquote{\si{\kilo\watt}} and the \enquote{\si{\hour}} unit to give +% \enquote{\si{\kWh}}. However, this only applies when the unit is given +% on its own: combinations will follow the normal rules +%\begin{LaTeXdemo} +% \si{\kWh} \\ +% \si{\kWh\per\metre} +%\end{LaTeXdemo} +% This is because the unit \cs{kWh} is defined so that it can still be +% varied by altering \cs{kilo}, \cs{watt} and \cs{hour}, and so that +% the prefix can still be turned into a number. However, some users +% may prefer to have a non-flexible macro which never adds a space. +% This can be achieved by redefining \cs{kWh} with \cs{DeclareSIUnit}, +% by added an alternative definition +%\begin{LaTeXdemo}[code only] +% \DeclareSIUnit\kWh{kWh} +% \DeclareSIUnit\KWH{kWh} +%\end{LaTeXdemo} +% or of course by using literal unit input. +%\begin{LaTeXdemo} +% \si{\KWH\per\metre}\\ +% \si{kWh.m^{-1}} +%\end{LaTeXdemo} +% +% Another point to notice is that the \cs{per} macro applies to +% the next unit, and not an entire unit combination. Thus in +%\begin{LaTeXdemo} +% \si{\candela\per\kWh} +%\end{LaTeXdemo} +% \cs{per} applies to the watts but not to the hours. In this case, +% the units need to be written out in full or the \opt{sticky-per} +% option should be used. +%\begin{LaTeXdemo} +% \si{\candela\per\kilo\watt\per\hour} \\ +% \si[sticky-per]{\candela\per\kWh} +%\end{LaTeXdemo} % %\section{Correct application of (SI) units} % @@ -3652,7 +3702,7 @@ This work consists of the file siunitx.dtx % % The usual preliminaries. % \begin{macrocode} -\ProvidesExplPackage {siunitx} {2010/05/23} {2.0} +\ProvidesExplPackage {siunitx} {2010/05/28} {2.0a} {A comprehensive (SI) units package} % \end{macrocode} % @@ -3804,16 +3854,184 @@ This work consists of the file siunitx.dtx %\end{macro} %\end{macro} % +%\begin{macro}{\_c_siunitx_old_options_seq} +% To pick up old options, all of the names need to be known. +% \begin{macrocode} +\seq_new:N \_c_siunitx_old_options_seq +\cs_set_protected_nopar:Npn \_siunitx_tmp:w #1 { + \seq_put_right:Nx \_c_siunitx_old_options_seq { \tl_to_str:n {#1} } +} +\_siunitx_tmp:w { addsign } +\_siunitx_tmp:w { allowlitunits } +\_siunitx_tmp:w { allowoptarg } +\_siunitx_tmp:w { allowzeroexp } +\_siunitx_tmp:w { alsoload } +\_siunitx_tmp:w { angformat } +\_siunitx_tmp:w { anglesep } +\_siunitx_tmp:w { astroang } +\_siunitx_tmp:w { closeerr } +\_siunitx_tmp:w { closrfrac } +\_siunitx_tmp:w { closerange } +\_siunitx_tmp:w { colorall } +\_siunitx_tmp:w { colourall } +\_siunitx_tmp:w { colorneg } +\_siunitx_tmp:w { colourneg } +\_siunitx_tmp:w { colourunits } +\_siunitx_tmp:w { colourunits } +\_siunitx_tmp:w { colorvalues } +\_siunitx_tmp:w { colourvalues } +\_siunitx_tmp:w { decimalsymbol } +\_siunitx_tmp:w { debug } +\_siunitx_tmp:w { detectdisplay } +\_siunitx_tmp:w { digitsep } +\_siunitx_tmp:w { dp } +\_siunitx_tmp:w { emulate } +\_siunitx_tmp:w { errspace } +\_siunitx_tmp:w { eVcorra } +\_siunitx_tmp:w { eVcorrb } +\_siunitx_tmp:w { expbase } +\_siunitx_tmp:w { expproduct } +\_siunitx_tmp:w { fixdp } +\_siunitx_tmp:w { fixsf } +\_siunitx_tmp:w { fraction } +\_siunitx_tmp:w { inlinebold } +\_siunitx_tmp:w { log } +\_siunitx_tmp:w { load } +\_siunitx_tmp:w { mathOmega } +\_siunitx_tmp:w { mathcelsius } +\_siunitx_tmp:w { mathdegree } +\_siunitx_tmp:w { mathminute } +\_siunitx_tmp:w { mathmu } +\_siunitx_tmp:w { mathringA } +\_siunitx_tmp:w { mathrm } +\_siunitx_tmp:w { mathsOmega } +\_siunitx_tmp:w { mathscelsius } +\_siunitx_tmp:w { mathsdegree } +\_siunitx_tmp:w { mathsecond } +\_siunitx_tmp:w { mathsf } +\_siunitx_tmp:w { mathsminute } +\_siunitx_tmp:w { mathsmu } +\_siunitx_tmp:w { mathsringA } +\_siunitx_tmp:w { mathsrm } +\_siunitx_tmp:w { mathssecond } +\_siunitx_tmp:w { mathssf } +\_siunitx_tmp:w { mathstt } +\_siunitx_tmp:w { mathtt } +\_siunitx_tmp:w { negcolor } +\_siunitx_tmp:w { negcolour } +\_siunitx_tmp:w { noload } +\_siunitx_tmp:w { numaddn } +\_siunitx_tmp:w { numcloseerr } +\_siunitx_tmp:w { numdecimal } +\_siunitx_tmp:w { numdigits } +\_siunitx_tmp:w { numdiv } +\_siunitx_tmp:w { numexp } +\_siunitx_tmp:w { numgobble } +\_siunitx_tmp:w { numopenerr } +\_siunitx_tmp:w { numprod } +\_siunitx_tmp:w { numsign } +\_siunitx_tmp:w { obeyall } +\_siunitx_tmp:w { obeybold } +\_siunitx_tmp:w { obeymode } +\_siunitx_tmp:w { obeyitalic } +\_siunitx_tmp:w { openerr } +\_siunitx_tmp:w { openfrac } +\_siunitx_tmp:w { openrange } +\_siunitx_tmp:w { padangle } +\_siunitx_tmp:w { padnumber } +\_siunitx_tmp:w { per } +\_siunitx_tmp:w { prefixbase } +\_siunitx_tmp:w { prefixproduct } +\_siunitx_tmp:w { prefixsymbolic } +\_siunitx_tmp:w { prespace } +\_siunitx_tmp:w { redefsymbols } +\_siunitx_tmp:w { repeatunits } +\_siunitx_tmp:w { retainplus } +\_siunitx_tmp:w { seperr } +\_siunitx_tmp:w { sepfour } +\_siunitx_tmp:w { sf } +\_siunitx_tmp:w { sign } +\_siunitx_tmp:w { slash } +\_siunitx_tmp:w { stickyper } +\_siunitx_tmp:w { stricarc } +\_siunitx_tmp:w { tabalign } +\_siunitx_tmp:w { tabalignexp } +\_siunitx_tmp:w { tabautofit } +\_siunitx_tmp:w { tabformat } +\_siunitx_tmp:w { tabnumalign } +\_siunitx_tmp:w { tabparseonly } +\_siunitx_tmp:w { tabtextalign } +\_siunitx_tmp:w { textOmega } +\_siunitx_tmp:w { textcelsius } +\_siunitx_tmp:w { textdegree } +\_siunitx_tmp:w { textminute } +\_siunitx_tmp:w { textmode } +\_siunitx_tmp:w { textmu } +\_siunitx_tmp:w { textringA } +\_siunitx_tmp:w { textrm } +\_siunitx_tmp:w { textsecond } +\_siunitx_tmp:w { textsf } +\_siunitx_tmp:w { texttt } +\_siunitx_tmp:w { tightpm } +\_siunitx_tmp:w { tophrase } +\_siunitx_tmp:w { trapamigerr } +\_siunitx_tmp:w { trapambigfrac } +\_siunitx_tmp:w { trapambigrange } +\_siunitx_tmp:w { unitcolor } +\_siunitx_tmp:w { unitcolour } +\_siunitx_tmp:w { unitmathrm } +\_siunitx_tmp:w { unitmathsf } +\_siunitx_tmp:w { unitmathsrm } +\_siunitx_tmp:w { unitmathssf } +\_siunitx_tmp:w { unitmathstt } +\_siunitx_tmp:w { unitmathtt } +\_siunitx_tmp:w { unitmode } +\_siunitx_tmp:w { unitsep } +\_siunitx_tmp:w { unitspace } +\_siunitx_tmp:w { valuecolor } +\_siunitx_tmp:w { valuecolour } +\_siunitx_tmp:w { valuemathrm } +\_siunitx_tmp:w { valuemathsf } +\_siunitx_tmp:w { valuemathsrm } +\_siunitx_tmp:w { valuemathssf } +\_siunitx_tmp:w { valuemathstt } +\_siunitx_tmp:w { valuemathtt } +\_siunitx_tmp:w { valuemode } +\_siunitx_tmp:w { valuesep } +\_siunitx_tmp:w { xpace } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\_l_siunitx_key_tl} % Unknown options should raise an \pkg{siunitx}-specific error message. % \begin{macrocode} +\tl_new:N \l_siunitx_key_tl \keys_define:nn { siunitx } { unknown .code:n = { - \msg_error:nnx { siunitx } { unknown-option } - { \exp_not:V \l_keys_key_tl } + \seq_if_in:NVTF \_c_siunitx_old_options_seq \l_keys_key_tl + { + \msg_warning:nnx { siunitx } { version-1-option } + { \exp_not:V \l_keys_key_tl } + \tl_set:Nx \_l_siunitx_key_tl + { + \keys_set:nn { siunitx } + { + \exp_not:V \l_keys_key_tl + \tl_if_blank:nF {#1} { = \exp_not:n {#1} } + } + } + \keys_set:nn { siunitx } { load-configurations = version-1 } + \tl_use:N \_l_siunitx_key_tl + } + { + \msg_error:nnx { siunitx } { unknown-option } + { \exp_not:V \l_keys_key_tl } + } } } % \end{macrocode} +%\end{macro} % %\begin{macro}{\_l_siunitx_option_deactivate_clist} %\begin{macro}{\_siunitx_option_deactivate:n} @@ -8444,7 +8662,7 @@ This work consists of the file siunitx.dtx { \_l_siunitx_number_unit_sep_tl } } } - \exp_not:n { \_siunitx_unit_in:nn {#1} { } } + \exp_not:n { \_siunitx_unit_output:nn {#1} { } } \bool_if:NT \_l_siunitx_create_xspace_bool { \exp_not:N \xspace } } @@ -8460,7 +8678,7 @@ This work consists of the file siunitx.dtx \ProvideDocumentCommand \exp_not:N #1 { o } { \exp_not:N \IfNoValueTF {####1} - { \exp_not:n { \_siunitx_unit_in:nn {#1} { } } } + { \exp_not:n { \_siunitx_unit_output:nn {#1} { } } } { \bool_if:NT \_l_siunitx_create_prespace_bool { @@ -8679,13 +8897,16 @@ This work consists of the file siunitx.dtx % \cs{keys_set:nn} is needed to allow the local overriding of settings. % \begin{macrocode} \cs_set_protected:Npn \_siunitx_unit_parse_options:nn #1#2 { - \cs_if_free:cF - { _l_siunitx_ \_siunitx_unit_first_token:n {#1} _options_tl } + \tl_if_single:nT {#1} { - \keys_set:nv { siunitx } + \cs_if_free:cF { _l_siunitx_ \_siunitx_unit_first_token:n {#1} _options_tl } - \keys_set:nn { siunitx } {#2} - } + { + \keys_set:nv { siunitx } + { _l_siunitx_ \_siunitx_unit_first_token:n {#1} _options_tl } + \keys_set:nn { siunitx } {#2} + } + } } % \end{macrocode} %\end{macro} @@ -11913,6 +12134,11 @@ This work consists of the file siunitx.dtx The~option~file~'#1'~is~not~known~by~siunitx: \\ perhaps~it~is~spelled~incorrectly. } +\msg_set:nnn { siunitx } { version-1-option } + { + Version~1~option~'#1'~detected: \\ + loading~compatibility~code. + } % \end{macrocode} % %\subsection{Design-level macros} @@ -11972,7 +12198,6 @@ This work consists of the file siunitx.dtx % A settings transfer function. % \begin{macrocode} \cs_set_protected_nopar:Npn \SendSettingsToPgf { \_siunitx_pgf_link: } -\@onlypreamble \SendSettingsToPgf % \end{macrocode} %\end{macro} % @@ -12680,7 +12905,7 @@ This work consists of the file siunitx.dtx % \end{macrocode} % % \begin{macrocode} -\ProvidesExplFile {siunitx-version-1.cfg} {2010/05/23} {2.0} +\ProvidesExplFile {siunitx-version-1.cfg} {2010/05/28} {2.0a} {siunitx: Version 1 settings} % \end{macrocode} % @@ -12707,40 +12932,41 @@ This work consists of the file siunitx.dtx allowoptargs .default:n = { true }, allowzeroexp .meta:n = { retain-zero-exponent = #1 }, allowzeroexp .default:n = { true }, -% angformat & List & Conversion of angle format \\ - angelsep .choice: , - angelsep / + alsoload .code:n = , + angformat .code:n = , + anglesep .choice: , + anglesep / cdot .meta:n = { arc-separator = { } \cdot { } }, - angelsep / + anglesep / comma .meta:n = { arc-separator = { {,} } }, - angelsep / + anglesep / fullstop .meta:n = { arc-separator = { { . } } }, - angelsep / + anglesep / med .meta:n = { arc-separator = \: }, - angelsep / + anglesep / medium .meta:n = { arc-separator = \: }, - angelsep / + anglesep / none .meta:n = { arc-separator = }, - angelsep / + anglesep / period .meta:n = { arc-separator = { { . } } }, - angelsep / + anglesep / space .meta:n = { arc-separator = \text { ~ } }, - angelsep / + anglesep / stop .meta:n = { arc-separator = { { . } } }, - angelsep / + anglesep / thick .meta:n = { arc-separator = \; }, - angelsep / + anglesep / thin .meta:n = { arc-separator = \, }, - angelsep / + anglesep / tightcdot .meta:n = { arc-separator = \bgroup \cdot \egroup }, - angelsep / + anglesep / tighttimes .meta:n = { arc-separator = \bgroup \times \egroup }, - angelsep / + anglesep / times .meta:n = { arc-separator = \times }, - angelsep / + anglesep / unknown .meta:n = { arc-separator = #1 }, astroang .meta:n = { angle-symbol-over-decimal = #1 }, @@ -12888,8 +13114,8 @@ This work consists of the file siunitx.dtx mathrm .meta:x = { math-rm = \exp_not:c {#1} }, mathsOmega .meta:n = { math-ohm = #1 }, - mathscelsius .meta:n = { math-celsius . = #1 }, - mathsdegree .meta:n = { math-degree . = #1 }, + mathscelsius .meta:n = { math-celsius = #1 }, + mathsdegree .meta:n = { math-degree = #1 }, mathsecond .meta:n = { math-arcsecond = #1 }, mathsf .meta:x = { math-sf = \exp_not:c {#1} }, @@ -12923,7 +13149,7 @@ This work consists of the file siunitx.dtx obeybold .meta:n = { detect-weight = #1 }, obeybold .default:n = { true }, obeyitalic .meta:n = { detect-italic = #1 }, - opbeyitalic .default:n = { true }, + obeyitalic .default:n = { true }, obeymode .meta:n = { detect-mode = #1 }, obeymode .default:n = { true }, openerr .meta:n = { open-bracket = #1 }, @@ -13242,15 +13468,40 @@ This work consists of the file siunitx.dtx xpace .default:n = { true } } % \end{macrocode} +% +% The error can be simplified here: if the option is not known, then +% it really is an error. +% \begin{macrocode} +\keys_define:nn { siunitx } { + unknown .code:n = + { + \msg_error:nnx { siunitx } { unknown-option } + { \exp_not:V \l_keys_key_tl } + } +} +% \end{macrocode} +% +% A couple of settings which are slightly different by default in +% version 1. +% \begin{macrocode} +\keys_set:nn { siunitx } { + free-standing-units = true , + mode = math , +} +% \end{macrocode} % %\begin{macro}{\newunit} %\begin{macro}{\renewunit} %\begin{macro}{\provideunit} % The functions for creating units from version one are easy to create. % \begin{macrocode} -\cs_set_eq:NN \newunit \DeclareSIUnit -\cs_set_eq:NN \renewunit \DeclareSIUnit -\cs_set_eq:NN \provideunit \DeclareSIUnit +\NewDocumentCommand \newunit { o m m } { + \IfNoValueTF {#1} + { \_siunitx_declare_unit:Nnn #2 {#3} { } } + { \_siunitx_declare_unit:Nnn #2 {#3} {#1} } +} +\cs_set_eq:NN \renewunit \newunit +\cs_set_eq:NN \provideunit \newunit % \end{macrocode} %\end{macro} %\end{macro} @@ -13479,6 +13730,58 @@ This work consists of the file siunitx.dtx % \end{macrocode} %\end{macro} % +%\begin{macro}{\micron} +%\begin{macro}{\mrad} +%\begin{macro}{\gauss} +%\begin{macro}{\eVperc} +%\begin{macro}{\nanobarn} +%\begin{macro}{\picobarn} +%\begin{macro}{\femptobarn} +%\begin{macro}{\attobarn} +%\begin{macro}{\zeptobarn} +%\begin{macro}{\yoctobarn} +%\begin{macro}{\nb} +%\begin{macro}{\pb} +%\begin{macro}{\fb} +%\begin{macro}{\ab} +%\begin{macro}{\zb} +%\begin{macro}{\yb} +% High-energy physics units from version one. +% \begin{macrocode} +\DeclareSIUnit \micron { \micro \metre } +\DeclareSIUnit \mrad { \milli \rad } +\DeclareSIUnit \gauss { G } +\DeclareSIUnit \eVperc { \eV \per \clight } +\DeclareSIUnit \nanobarn { \nano \barn } +\DeclareSIUnit \picobarn { \pico \barn } +\DeclareSIUnit \femtobarn { \femto \barn } +\DeclareSIUnit \attobarn { \atto \barn } +\DeclareSIUnit \zeptobarn { \zepto \barn } +\DeclareSIUnit \yoctobarn { \yocto \barn } +\DeclareSIUnit \nb { \nano \barn } +\DeclareSIUnit \pb { \pico \barn } +\DeclareSIUnit \fb { \femto \barn } +\DeclareSIUnit \ab { \atto \barn } +\DeclareSIUnit \zb { \zepto \barn } +\DeclareSIUnit \yb { \yocto \barn } +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +% % \begin{macrocode} %</version-1> % \end{macrocode} @@ -13490,7 +13793,7 @@ This work consists of the file siunitx.dtx % \end{macrocode} % % \begin{macrocode} -\ProvidesExplFile {siunitx-abbreviations.cfg} {2010/05/23} {2.0} +\ProvidesExplFile {siunitx-abbreviations.cfg} {2010/05/28} {2.0a} {siunitx: Abbreviated units} % \end{macrocode} % @@ -13698,7 +14001,7 @@ This work consists of the file siunitx.dtx % \end{macrocode} % % \begin{macrocode} -\ProvidesExplFile {siunitx-binary.cfg} {2010/05/23} {2.0} +\ProvidesExplFile {siunitx-binary.cfg} {2010/05/28} {2.0a} {siunitx: Binary units} % \end{macrocode} % 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 d4d787aeb34..cfa9241cd4d 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} {2010/05/23} {2.0} +\ProvidesExplFile {siunitx-abbreviations.cfg} {2010/05/28} {2.0a} {siunitx: Abbreviated units} \DeclareSIUnit \pA { \pico \ampere } \DeclareSIUnit \nA { \nano \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 32707c3458b..3db2a7eb0dd 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/05/23} {2.0} +\ProvidesExplFile {siunitx-binary.cfg} {2010/05/28} {2.0a} {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 c7129987c98..790ecfc3f67 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/05/23} {2.0} +\ProvidesExplFile {siunitx-version-1.cfg} {2010/05/28} {2.0a} {siunitx: Version 1 settings} \keys_set:nn { siunitx } { load-configurations = abbreviations } \keys_define:nn { siunitx } { @@ -29,39 +29,41 @@ allowoptargs .default:n = { true }, allowzeroexp .meta:n = { retain-zero-exponent = #1 }, allowzeroexp .default:n = { true }, - angelsep .choice: , - angelsep / + alsoload .code:n = , + angformat .code:n = , + anglesep .choice: , + anglesep / cdot .meta:n = { arc-separator = { } \cdot { } }, - angelsep / + anglesep / comma .meta:n = { arc-separator = { {,} } }, - angelsep / + anglesep / fullstop .meta:n = { arc-separator = { { . } } }, - angelsep / + anglesep / med .meta:n = { arc-separator = \: }, - angelsep / + anglesep / medium .meta:n = { arc-separator = \: }, - angelsep / + anglesep / none .meta:n = { arc-separator = }, - angelsep / + anglesep / period .meta:n = { arc-separator = { { . } } }, - angelsep / + anglesep / space .meta:n = { arc-separator = \text { ~ } }, - angelsep / + anglesep / stop .meta:n = { arc-separator = { { . } } }, - angelsep / + anglesep / thick .meta:n = { arc-separator = \; }, - angelsep / + anglesep / thin .meta:n = { arc-separator = \, }, - angelsep / + anglesep / tightcdot .meta:n = { arc-separator = \bgroup \cdot \egroup }, - angelsep / + anglesep / tighttimes .meta:n = { arc-separator = \bgroup \times \egroup }, - angelsep / + anglesep / times .meta:n = { arc-separator = \times }, - angelsep / + anglesep / unknown .meta:n = { arc-separator = #1 }, astroang .meta:n = { angle-symbol-over-decimal = #1 }, @@ -209,8 +211,8 @@ mathrm .meta:x = { math-rm = \exp_not:c {#1} }, mathsOmega .meta:n = { math-ohm = #1 }, - mathscelsius .meta:n = { math-celsius . = #1 }, - mathsdegree .meta:n = { math-degree . = #1 }, + mathscelsius .meta:n = { math-celsius = #1 }, + mathsdegree .meta:n = { math-degree = #1 }, mathsecond .meta:n = { math-arcsecond = #1 }, mathsf .meta:x = { math-sf = \exp_not:c {#1} }, @@ -244,7 +246,7 @@ obeybold .meta:n = { detect-weight = #1 }, obeybold .default:n = { true }, obeyitalic .meta:n = { detect-italic = #1 }, - opbeyitalic .default:n = { true }, + obeyitalic .default:n = { true }, obeymode .meta:n = { detect-mode = #1 }, obeymode .default:n = { true }, openerr .meta:n = { open-bracket = #1 }, @@ -562,9 +564,24 @@ xspace .meta:n = { use-xspace = #1 }, xpace .default:n = { true } } -\cs_set_eq:NN \newunit \DeclareSIUnit -\cs_set_eq:NN \renewunit \DeclareSIUnit -\cs_set_eq:NN \provideunit \DeclareSIUnit +\keys_define:nn { siunitx } { + unknown .code:n = + { + \msg_error:nnx { siunitx } { unknown-option } + { \exp_not:V \l_keys_key_tl } + } +} +\keys_set:nn { siunitx } { + free-standing-units = true , + mode = math , +} +\NewDocumentCommand \newunit { o m m } { + \IfNoValueTF {#1} + { \_siunitx_declare_unit:Nnn #2 {#3} { } } + { \_siunitx_declare_unit:Nnn #2 {#3} {#1} } +} +\cs_set_eq:NN \renewunit \newunit +\cs_set_eq:NN \provideunit \newunit \NewDocumentCommand \newpower { o m m } { \IfNoValueTF {#1} { \DeclareSIPrePower #2 {#3} } @@ -638,6 +655,22 @@ \DeclareSIUnit \Molar { \textsc { m } } \DeclareSIUnit \torr { Torr } \DeclareSIUnit \gon { gon } +\DeclareSIUnit \micron { \micro \metre } +\DeclareSIUnit \mrad { \milli \rad } +\DeclareSIUnit \gauss { G } +\DeclareSIUnit \eVperc { \eV \per \clight } +\DeclareSIUnit \nanobarn { \nano \barn } +\DeclareSIUnit \picobarn { \pico \barn } +\DeclareSIUnit \femtobarn { \femto \barn } +\DeclareSIUnit \attobarn { \atto \barn } +\DeclareSIUnit \zeptobarn { \zepto \barn } +\DeclareSIUnit \yoctobarn { \yocto \barn } +\DeclareSIUnit \nb { \nano \barn } +\DeclareSIUnit \pb { \pico \barn } +\DeclareSIUnit \fb { \femto \barn } +\DeclareSIUnit \ab { \atto \barn } +\DeclareSIUnit \zb { \zepto \barn } +\DeclareSIUnit \yb { \yocto \barn } %% %% Copyright (C) 2008-2010 by %% Joseph Wright <joseph.wright@morningstar2.co.uk> diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty index a407b5d22b6..97211e1db54 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/05/23} {2.0} +\ProvidesExplPackage {siunitx} {2010/05/28} {2.0a} {A comprehensive (SI) units package} \msg_set:nnnn { siunitx } { incompatible-package } { Package~'#1'~incompatible. } @@ -79,11 +79,171 @@ } \cs_generate_variant:Nn \_siunitx_tl_put_right_math:Nn { NV } \cs_generate_variant:Nn \_siunitx_tl_put_right_math:Nn { cV } +\seq_new:N \_c_siunitx_old_options_seq +\cs_set_protected_nopar:Npn \_siunitx_tmp:w #1 { + \seq_put_right:Nx \_c_siunitx_old_options_seq { \tl_to_str:n {#1} } +} +\_siunitx_tmp:w { addsign } +\_siunitx_tmp:w { allowlitunits } +\_siunitx_tmp:w { allowoptarg } +\_siunitx_tmp:w { allowzeroexp } +\_siunitx_tmp:w { alsoload } +\_siunitx_tmp:w { angformat } +\_siunitx_tmp:w { anglesep } +\_siunitx_tmp:w { astroang } +\_siunitx_tmp:w { closeerr } +\_siunitx_tmp:w { closrfrac } +\_siunitx_tmp:w { closerange } +\_siunitx_tmp:w { colorall } +\_siunitx_tmp:w { colourall } +\_siunitx_tmp:w { colorneg } +\_siunitx_tmp:w { colourneg } +\_siunitx_tmp:w { colourunits } +\_siunitx_tmp:w { colourunits } +\_siunitx_tmp:w { colorvalues } +\_siunitx_tmp:w { colourvalues } +\_siunitx_tmp:w { decimalsymbol } +\_siunitx_tmp:w { debug } +\_siunitx_tmp:w { detectdisplay } +\_siunitx_tmp:w { digitsep } +\_siunitx_tmp:w { dp } +\_siunitx_tmp:w { emulate } +\_siunitx_tmp:w { errspace } +\_siunitx_tmp:w { eVcorra } +\_siunitx_tmp:w { eVcorrb } +\_siunitx_tmp:w { expbase } +\_siunitx_tmp:w { expproduct } +\_siunitx_tmp:w { fixdp } +\_siunitx_tmp:w { fixsf } +\_siunitx_tmp:w { fraction } +\_siunitx_tmp:w { inlinebold } +\_siunitx_tmp:w { log } +\_siunitx_tmp:w { load } +\_siunitx_tmp:w { mathOmega } +\_siunitx_tmp:w { mathcelsius } +\_siunitx_tmp:w { mathdegree } +\_siunitx_tmp:w { mathminute } +\_siunitx_tmp:w { mathmu } +\_siunitx_tmp:w { mathringA } +\_siunitx_tmp:w { mathrm } +\_siunitx_tmp:w { mathsOmega } +\_siunitx_tmp:w { mathscelsius } +\_siunitx_tmp:w { mathsdegree } +\_siunitx_tmp:w { mathsecond } +\_siunitx_tmp:w { mathsf } +\_siunitx_tmp:w { mathsminute } +\_siunitx_tmp:w { mathsmu } +\_siunitx_tmp:w { mathsringA } +\_siunitx_tmp:w { mathsrm } +\_siunitx_tmp:w { mathssecond } +\_siunitx_tmp:w { mathssf } +\_siunitx_tmp:w { mathstt } +\_siunitx_tmp:w { mathtt } +\_siunitx_tmp:w { negcolor } +\_siunitx_tmp:w { negcolour } +\_siunitx_tmp:w { noload } +\_siunitx_tmp:w { numaddn } +\_siunitx_tmp:w { numcloseerr } +\_siunitx_tmp:w { numdecimal } +\_siunitx_tmp:w { numdigits } +\_siunitx_tmp:w { numdiv } +\_siunitx_tmp:w { numexp } +\_siunitx_tmp:w { numgobble } +\_siunitx_tmp:w { numopenerr } +\_siunitx_tmp:w { numprod } +\_siunitx_tmp:w { numsign } +\_siunitx_tmp:w { obeyall } +\_siunitx_tmp:w { obeybold } +\_siunitx_tmp:w { obeymode } +\_siunitx_tmp:w { obeyitalic } +\_siunitx_tmp:w { openerr } +\_siunitx_tmp:w { openfrac } +\_siunitx_tmp:w { openrange } +\_siunitx_tmp:w { padangle } +\_siunitx_tmp:w { padnumber } +\_siunitx_tmp:w { per } +\_siunitx_tmp:w { prefixbase } +\_siunitx_tmp:w { prefixproduct } +\_siunitx_tmp:w { prefixsymbolic } +\_siunitx_tmp:w { prespace } +\_siunitx_tmp:w { redefsymbols } +\_siunitx_tmp:w { repeatunits } +\_siunitx_tmp:w { retainplus } +\_siunitx_tmp:w { seperr } +\_siunitx_tmp:w { sepfour } +\_siunitx_tmp:w { sf } +\_siunitx_tmp:w { sign } +\_siunitx_tmp:w { slash } +\_siunitx_tmp:w { stickyper } +\_siunitx_tmp:w { stricarc } +\_siunitx_tmp:w { tabalign } +\_siunitx_tmp:w { tabalignexp } +\_siunitx_tmp:w { tabautofit } +\_siunitx_tmp:w { tabformat } +\_siunitx_tmp:w { tabnumalign } +\_siunitx_tmp:w { tabparseonly } +\_siunitx_tmp:w { tabtextalign } +\_siunitx_tmp:w { textOmega } +\_siunitx_tmp:w { textcelsius } +\_siunitx_tmp:w { textdegree } +\_siunitx_tmp:w { textminute } +\_siunitx_tmp:w { textmode } +\_siunitx_tmp:w { textmu } +\_siunitx_tmp:w { textringA } +\_siunitx_tmp:w { textrm } +\_siunitx_tmp:w { textsecond } +\_siunitx_tmp:w { textsf } +\_siunitx_tmp:w { texttt } +\_siunitx_tmp:w { tightpm } +\_siunitx_tmp:w { tophrase } +\_siunitx_tmp:w { trapamigerr } +\_siunitx_tmp:w { trapambigfrac } +\_siunitx_tmp:w { trapambigrange } +\_siunitx_tmp:w { unitcolor } +\_siunitx_tmp:w { unitcolour } +\_siunitx_tmp:w { unitmathrm } +\_siunitx_tmp:w { unitmathsf } +\_siunitx_tmp:w { unitmathsrm } +\_siunitx_tmp:w { unitmathssf } +\_siunitx_tmp:w { unitmathstt } +\_siunitx_tmp:w { unitmathtt } +\_siunitx_tmp:w { unitmode } +\_siunitx_tmp:w { unitsep } +\_siunitx_tmp:w { unitspace } +\_siunitx_tmp:w { valuecolor } +\_siunitx_tmp:w { valuecolour } +\_siunitx_tmp:w { valuemathrm } +\_siunitx_tmp:w { valuemathsf } +\_siunitx_tmp:w { valuemathsrm } +\_siunitx_tmp:w { valuemathssf } +\_siunitx_tmp:w { valuemathstt } +\_siunitx_tmp:w { valuemathtt } +\_siunitx_tmp:w { valuemode } +\_siunitx_tmp:w { valuesep } +\_siunitx_tmp:w { xpace } +\tl_new:N \l_siunitx_key_tl \keys_define:nn { siunitx } { unknown .code:n = { - \msg_error:nnx { siunitx } { unknown-option } - { \exp_not:V \l_keys_key_tl } + \seq_if_in:NVTF \_c_siunitx_old_options_seq \l_keys_key_tl + { + \msg_warning:nnx { siunitx } { version-1-option } + { \exp_not:V \l_keys_key_tl } + \tl_set:Nx \_l_siunitx_key_tl + { + \keys_set:nn { siunitx } + { + \exp_not:V \l_keys_key_tl + \tl_if_blank:nF {#1} { = \exp_not:n {#1} } + } + } + \keys_set:nn { siunitx } { load-configurations = version-1 } + \tl_use:N \_l_siunitx_key_tl + } + { + \msg_error:nnx { siunitx } { unknown-option } + { \exp_not:V \l_keys_key_tl } + } } } \clist_new:N \_l_siunitx_option_deactivate_clist @@ -3113,7 +3273,7 @@ { \_l_siunitx_number_unit_sep_tl } } } - \exp_not:n { \_siunitx_unit_in:nn {#1} { } } + \exp_not:n { \_siunitx_unit_output:nn {#1} { } } \bool_if:NT \_l_siunitx_create_xspace_bool { \exp_not:N \xspace } } @@ -3129,7 +3289,7 @@ \ProvideDocumentCommand \exp_not:N #1 { o } { \exp_not:N \IfNoValueTF {####1} - { \exp_not:n { \_siunitx_unit_in:nn {#1} { } } } + { \exp_not:n { \_siunitx_unit_output:nn {#1} { } } } { \bool_if:NT \_l_siunitx_create_prespace_bool { @@ -3244,13 +3404,16 @@ } \cs_set_protected_nopar:Npn \_siunitx_pm: { } \cs_set_protected:Npn \_siunitx_unit_parse_options:nn #1#2 { - \cs_if_free:cF - { _l_siunitx_ \_siunitx_unit_first_token:n {#1} _options_tl } + \tl_if_single:nT {#1} { - \keys_set:nv { siunitx } + \cs_if_free:cF { _l_siunitx_ \_siunitx_unit_first_token:n {#1} _options_tl } - \keys_set:nn { siunitx } {#2} - } + { + \keys_set:nv { siunitx } + { _l_siunitx_ \_siunitx_unit_first_token:n {#1} _options_tl } + \keys_set:nn { siunitx } {#2} + } + } } \cs_set_protected:Npn \_siunitx_unit_parse_power_before:n #1 { \tl_set:Nx \_l_siunitx_tmpa_tl @@ -5410,6 +5573,11 @@ The~option~file~'#1'~is~not~known~by~siunitx: \\ perhaps~it~is~spelled~incorrectly. } +\msg_set:nnn { siunitx } { version-1-option } + { + Version~1~option~'#1'~detected: \\ + loading~compatibility~code. + } \cs_set_protected_nopar:Npn \DeclareBinaryPrefix #1#2#3 { \_siunitx_declare_prefix:Nnnn #1 {#2} { 2 } {#3} } @@ -5439,7 +5607,6 @@ \@onlypreamble \DeclareSIUnit \@onlypreamble \DeclareSIUnitWithOptions \cs_set_protected_nopar:Npn \SendSettingsToPgf { \_siunitx_pgf_link: } -\@onlypreamble \SendSettingsToPgf \NewDocumentCommand \ang { o > { \SplitArgument { 2 } { ; } } m } { \group_begin: \IfNoValueF {#1} |