summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/SIstyle
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-12-20 23:43:03 +0000
committerKarl Berry <karl@freefriends.org>2006-12-20 23:43:03 +0000
commitcd841589f4c33a97df820008421c61b888421bd2 (patch)
treea43e3024f84a3cd2c3bdf995a9e27b377caab2b4 /Master/texmf-dist/tex/latex/SIstyle
parentbc4a995000d7adee634bcf3ba5404d93fa86bcd4 (diff)
SIstyle update (21dec06)
git-svn-id: svn://tug.org/texlive/trunk@2830 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/SIstyle')
-rw-r--r--Master/texmf-dist/tex/latex/SIstyle/sistyle.sty43
1 files changed, 37 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/SIstyle/sistyle.sty b/Master/texmf-dist/tex/latex/SIstyle/sistyle.sty
index b1828606b12..1526f83297b 100644
--- a/Master/texmf-dist/tex/latex/SIstyle/sistyle.sty
+++ b/Master/texmf-dist/tex/latex/SIstyle/sistyle.sty
@@ -31,8 +31,19 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{sistyle}
- [2006/07/11 v2.1 SI units and numbers (DNJ Els)]
+ [2006/12/20 v2.3 SI units and numbers (DNJ Els)]
\RequirePackage{amstext}
+\newif\ifSI@eTeX
+\SI@eTeXfalse
+\ifx\eTeXversion\@undefined
+\else
+ \ifx\eTeXversion\relax
+ \else
+ \ifnum\eTeXversion>\z@
+ \SI@eTeXtrue
+ \fi
+ \fi
+\fi
\begingroup
\catcode`\Q=3
\long\gdef\SI@ifempt#1{\SI@xifempt#1QQ\@secondoftwo\@firstoftwo\@nil}
@@ -225,20 +236,40 @@
\let\SI@unitdot=\pnt%
\SIupmath[\SI@defaultNfam]{\SI@num{#1}}}}
\DeclareRobustCommand*{\num}{\@ifstar{\SI@num}{\SInum}}
+\ifSI@eTeX
+ \DeclareRobustCommand{\ang}{%
+ \begingroup
+ \catcode`;=12\relax
+ \catcode`@=11\relax
+ \SI@ang}
+ \def\SI@ang#1{%
+ \scantokens{\SI@@ang#1;;;\@nil}%
+ \endgroup}
+ \def\SI@@ang#1;#2;#3;#4\@nil{%
+ \SI@@@ang{#1}{#2}{#3}}%
+\else
+ \DeclareRobustCommand{\ang}[1]{%
+ \@nameuse{SI@ang@\romannumeral\catcode`\;}{#1}}%
+ \begingroup
+ \catcode`\;=12\relax
+ \gdef\SI@ang@xii#1{\SI@@ang@xii#1;;;\@nil}
+ \gdef\SI@@ang@xii#1;#2;#3;#4\@nil{\SI@@@ang{#1}{#2}{#3}}
+ \catcode`\;=\active\relax
+ \gdef\SI@ang@xiii#1{\SI@@ang@xiii#1;;;\@nil}
+ \gdef\SI@@ang@xiii#1;#2;#3;#4\@nil{\SI@@@ang{#1}{#2}{#3}}
+ \endgroup
+\fi
\let\SI@degs=\relax
\let\SI@mins=\relax
\let\SI@secs=\relax
-\DeclareRobustCommand{\ang}[1]{\SI@ang#1;;;\@nnil}
-\def\SI@ang#1;#2;#3;#4\@nnil{%
-\bgroup
+\newcommand*{\SI@@@ang}[3]{{%
\SI@ifempt{#3}{}{\def\SI@secs{\SInum{#3}\SIupmath{\arcsec}}%
\def\SI@mins{\SInum{0}\SIupmath{\arcmin}}%
\def\SI@degs{\SInum{0}\SIupmath{\arcdeg}}}%
\SI@ifempt{#2}{}{\def\SI@mins{\SInum{#2}\SIupmath{\arcmin}}%
\def\SI@degs{\SInum{0}\SIupmath{\arcdeg}}}%
\SI@ifempt{#1}{}{\def\SI@degs{\SInum{#1}\SIupmath{\arcdeg}}}%
- \SI@degs\SI@mins\SI@secs
-\egroup}
+ \SI@degs\SI@mins\SI@secs}}
\newcommand*{\SI@unitsep}{\,}
\newcommand*{\SIunitsep}[1]{\renewcommand*{\SI@unitsep}{#1}}
\newcommand*{\SI@unitspace}{\,}