summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-12-23 00:24:42 +0000
committerKarl Berry <karl@freefriends.org>2010-12-23 00:24:42 +0000
commitc921dfc3f7ecaf9ada56612535cb34c98e609047 (patch)
treeaac110b0bc752bc21f989dc0b7298fc3271dd653 /Master
parent4e5040e3f22afbee205156eb6e64b5e5002b088e (diff)
siunitx (22dec10)
git-svn-id: svn://tug.org/texlive/trunk@20830 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/siunitx/siunitx.pdfbin517436 -> 517545 bytes
-rw-r--r--Master/texmf-dist/source/latex/siunitx/siunitx.dtx45
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/siunitx.sty30
3 files changed, 75 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf b/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf
index 3f1745d7839..a40e5404264 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 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 }
diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
index ab74299888b..272ca6f6e03 100644
--- a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
+++ b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
@@ -16,6 +16,29 @@
\RequirePackage{expl3}
\ProvidesExplPackage {siunitx} {2010/11/24} {2.1f}
{A comprehensive (SI) units package}
+\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
+ }
\msg_set:nnnn { siunitx } { incompatible-package }
{ Package~'#1'~incompatible. }
{ The~#1~package~and~siunitx~are~incompatible. }
@@ -33,6 +56,13 @@
\clist_map_function:nN { SIunits , sistyle , siunits , SIstyle }
\siunitx_load_check:n
}
+\RequirePackage{ xparse }
+\@ifpackagelater { xparse } { 2010/10/13 }
+ { }
+ {
+ \msg_error:nnx { siunitx } { support-outdated } { xparse }
+ \tex_endinput:D
+ }
\RequirePackage{ amstext , array , l3keys2e }
\cs_new:Npn \siunitx_tmp:w { }
\bool_new:N \l_siunitx_tmp_bool