diff options
author | Karl Berry <karl@freefriends.org> | 2010-12-23 00:24:42 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-12-23 00:24:42 +0000 |
commit | c921dfc3f7ecaf9ada56612535cb34c98e609047 (patch) | |
tree | aac110b0bc752bc21f989dc0b7298fc3271dd653 /Master/texmf-dist/source | |
parent | 4e5040e3f22afbee205156eb6e64b5e5002b088e (diff) |
siunitx (22dec10)
git-svn-id: svn://tug.org/texlive/trunk@20830 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/siunitx/siunitx.dtx | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx index 835c0422689..e99a47995d0 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx +++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx @@ -523,6 +523,8 @@ This work consists of the file siunitx.dtx % \pkg{fontspec} package} %\changes{v2.1f}{2010/11/24}{Typo in definition for % \opt{unit-optional-argument} implementation corrected} +%\changes{v2.1g}{2010/12/21}{Checks on the versions of \pkg{expl3} and +% \pkg{xparse} installed} % %\begin{abstract} % Typesetting values with units requires care to ensure that the @@ -4410,6 +4412,37 @@ This work consists of the file siunitx.dtx \ProvidesExplPackage {siunitx} {2010/11/24} {2.1f} {A comprehensive (SI) units package} % \end{macrocode} +% +% Various problems pop up if the support files are too old. First, +% a check on \pkg{expl3}. There is also a check on \pkg{xparse}, but +% that comes a bit later. If the version of \pkg{expl3} is \emph{really} +% old then the message system may not be in place at all: there is a +% back up for that case. +% \begin{macrocode} +\cs_if_exist:NTF \msg_set:nnnn + { + \msg_set:nnnn { siunitx } { support-outdated } + { Support~package~#1~too~old. } + { + Please~install~an~up~to~date~version~of~#1. \\ + Loading~siunitx~will~abort! + } + } + { + \PackageError { siunitx } { Support~package~expl3~too~old. } + { + Please~install~an~up~to~date~version~of~expl3. \\ + Loading~siunitx~will~abort! + } + \tex_endinput:D + } +\@ifpackagelater { expl3 } { 2010/11/13 } + { } + { + \msg_error:nnx { siunitx } { support-outdated } { expl3 } + \tex_endinput:D + } +% \end{macrocode} % %\begin{macro}{\siunitx_load_check:} % There are also a number of packages that are incompatible with @@ -4439,6 +4472,18 @@ This work consists of the file siunitx.dtx % \end{macrocode} %\end{macro} % +% The version of \pkg{xparse} available is checked to avoid any weird +% errors. +% \begin{macrocode} +\RequirePackage{ xparse } +\@ifpackagelater { xparse } { 2010/10/13 } + { } + { + \msg_error:nnx { siunitx } { support-outdated } { xparse } + \tex_endinput:D + } +% \end{macrocode} +% % Now load the support packages. % \begin{macrocode} \RequirePackage{ amstext , array , l3keys2e } |