diff options
author | Karl Berry <karl@freefriends.org> | 2006-12-20 23:43:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-12-20 23:43:03 +0000 |
commit | cd841589f4c33a97df820008421c61b888421bd2 (patch) | |
tree | a43e3024f84a3cd2c3bdf995a9e27b377caab2b4 /Master/texmf-dist/source/latex/SIstyle | |
parent | bc4a995000d7adee634bcf3ba5404d93fa86bcd4 (diff) |
SIstyle update (21dec06)
git-svn-id: svn://tug.org/texlive/trunk@2830 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/SIstyle')
-rw-r--r-- | Master/texmf-dist/source/latex/SIstyle/sistyle.dtx | 96 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/SIstyle/sistyle.ins | 170 |
2 files changed, 159 insertions, 107 deletions
diff --git a/Master/texmf-dist/source/latex/SIstyle/sistyle.dtx b/Master/texmf-dist/source/latex/SIstyle/sistyle.dtx index 4805e97aeb7..bb0b447a4cf 100644 --- a/Master/texmf-dist/source/latex/SIstyle/sistyle.dtx +++ b/Master/texmf-dist/source/latex/SIstyle/sistyle.dtx @@ -31,7 +31,7 @@ % ------------------------------------------------------------------- % \fi % -% \CheckSum{767} +% \CheckSum{830} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -57,13 +57,14 @@ %<package>\ProvidesPackage{sistyle} %<driver>\ProvidesFile{sistyle.drv} %\ProvidesFile{sistyle.dtx} - [2006/07/11 v2.1 SI units and numbers (DNJ Els)] + [2006/12/20 v2.3 SI units and numbers (DNJ Els)] %<*driver> \documentclass[a4paper]{ltxdoc} \usepackage{calc} -%\usepackage[T1]{fontenc} -\usepackage{textcomp} \usepackage{amsmath} +\usepackage[T1]{fontenc} +\usepackage{textcomp} +\usepackage{lmodern} \usepackage{sistyle} \SIdefaultNfam{\mathnormal} \SIdefaultMfam{\mathrm} @@ -88,8 +89,10 @@ % % % \changes{v1.0}{2004/02/01}{Initial version} -% \changes{v2.0}{2004/07/09}{Better display math detection with \cs{displaywidth}} -% \changes{v2.1}{2004/07/09}{Add user definable commands for \cs{mathrm}, \cs{mathsf}, \cs{mathtt}} +% \changes{v2.0}{2004/07/12}{Better display math detection with \cs{displaywidth}} +% \changes{v2.1}{2006/07/09}{Add user definable commands for \cs{mathrm}, \cs{mathsf}, \cs{mathtt}} +% \changes{v2.2}{2006/12/14}{Correct bug in \cs{ang} when French package is loaded} +% \changes{v2.3}{2006/12/20}{Make \cs{ang} work in side commands when ; is active} % % % \DoNotIndex{\,} @@ -1368,6 +1371,21 @@ \RequirePackage{amstext} % \end{macrocode} % +% \subsection{Test for $\varepsilon$-\TeX} +% \begin{macrocode} +\newif\ifSI@eTeX +\SI@eTeXfalse +\ifx\eTeXversion\@undefined +\else + \ifx\eTeXversion\relax + \else + \ifnum\eTeXversion>\z@ + \SI@eTeXtrue + \fi + \fi +\fi +% \end{macrocode} +% % \subsection{Test for empty argument} % % \begin{macro}{\SI@ifempt} @@ -1857,40 +1875,74 @@ % % \section{Typesetting Angles} % -% \begin{macro}{\SI@degs} -% \begin{macro}{\SI@mins} -% \begin{macro}{\SI@secs} -% Scratch commands to hold definitions. +% +% \begin{macro}{\ang} +% \begin{macro}{\SI@ang} +% \begin{macro}{\SI@@ang} +% \begin{macro}{\SI@ang@xii} +% \begin{macro}{\SI@@ang@xii} +% \begin{macro}{\SI@ang@xiii} +% \begin{macro}{\SI@@ang@xiii} +% The robust user command to typeset angles. Note that we +% have to make provisions for packages such as French that +% make the semicolon (;) active % \begin{macrocode} -\let\SI@degs=\relax -\let\SI@mins=\relax -\let\SI@secs=\relax +\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 % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} % -% \begin{macro}{\ang} -% \begin{macro}{\SI@ang} -% The robust user command to typeset angles. +% \begin{macro}{\SI@degs} +% \begin{macro}{\SI@mins} +% \begin{macro}{\SI@secs} +% \begin{macro}{\SI@@@ang} +% Scratch commands to hold definitions and typeset angles. % \begin{macrocode} -\DeclareRobustCommand{\ang}[1]{\SI@ang#1;;;\@nnil} +\let\SI@degs=\relax +\let\SI@mins=\relax +\let\SI@secs=\relax % \end{macrocode} % \begin{macrocode} -\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}} % \end{macrocode} % \end{macro} % \end{macro} -% +% \end{macro} +% \end{macro} % % % \section{Typesetting Units} diff --git a/Master/texmf-dist/source/latex/SIstyle/sistyle.ins b/Master/texmf-dist/source/latex/SIstyle/sistyle.ins index 1de043dd758..aeb623357ff 100644 --- a/Master/texmf-dist/source/latex/SIstyle/sistyle.ins +++ b/Master/texmf-dist/source/latex/SIstyle/sistyle.ins @@ -1,85 +1,85 @@ -% ------------------------------------------------------------------- -% The SIstyle package -% for SI units and number typesetting -% ------------------------------------------------------------------- -% -% File: sistyle.ins -% Author: Danie Els (dnjels@sun.ac.za) -% -% This file will generate fast loadable files and documentation -% driver files from the doc files in this package when run through -% LaTeX or TeX. -% -% Copyright (C) 2004-2006 Danie Els -% All rights reserved. -% -% This work may be distributed and/or modified under the conditions -% of the LaTeX Project Public License, either version 1.3c of this -% license or (at your option) any later version. The latest version -% of the license is in -% http://www.latex-project.org/lppl -% and version 1.3c or later is part of all distributions of LaTeX -% version 2005/12/01 or later. -% -% This work has the LPPL maintenance status "author-maintained". -% -% The Current Maintainer of this work Danie Els (dnjels@sun.ac.za). -% -% This package consists of the files sistyle.dtx and sistyle.ins as -% well as the derived file sistyle.sty. See the file 'readme.txt' -% for a list of all the files as well as directions for the -% installation of this package. -% ------------------------------------------------------------------- - - -\def\batchfile{sistyle.ins} -\def\filedate{2006/07/11} -\input docstrip.tex -\keepsilent - -\declarepreamble\DNJEpreamble - -------------------------------------------------------------------- - The SIstyle package - for SI units and number typesetting -------------------------------------------------------------------- - -Author: Danie Els - - Copyright (C) 2004-2006 Danie Els - All rights reserved. - -This work may be distributed and/or modified under the conditions -of the LaTeX Project Public License, either version 1.3c of this -license or (at your option) any later version. The latest version -of this license is in: - http://www.latex-project.org/lppl/ -and version 1.3c or later is part of all distributions of LaTeX -version 2005/12/01 or later. - -This work has the LPPL maintenance status `maintained'. - -This Current Maintainer of this work is Danie Els (dnjels@sun.ac.za) ---------------------------------------------------------------------- - -\endpreamble - -\generate{% - \askforoverwritefalse - \usepreamble\DNJEpreamble - \file{sistyle.sty}{\from{sistyle.dtx}{package}}} - -\obeyspaces% -\Msg{*********************************************************} -\Msg{* *} -\Msg{* To finish the installation you have to move the *} -\Msg{* following file into a directory searched by TeX: *} -\Msg{* *} -\Msg{* sistyle.sty *} -\Msg{* *} -\Msg{* To produce the documentation run the file sistyle.dtx *} -\Msg{* through LaTeX. *} -\Msg{* *} -\Msg{* Happy TeXing! *} -\Msg{*********************************************************} -\endbatchfile +% -------------------------------------------------------------------
+% The SIstyle package
+% for SI units and number typesetting
+% -------------------------------------------------------------------
+%
+% File: sistyle.ins
+% Author: Danie Els (dnjels@sun.ac.za)
+%
+% This file will generate fast loadable files and documentation
+% driver files from the doc files in this package when run through
+% LaTeX or TeX.
+%
+% Copyright (C) 2004-2006 Danie Els
+% All rights reserved.
+%
+% This work may be distributed and/or modified under the conditions
+% of the LaTeX Project Public License, either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of the license is in
+% http://www.latex-project.org/lppl
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "author-maintained".
+%
+% The Current Maintainer of this work Danie Els (dnjels@sun.ac.za).
+%
+% This package consists of the files sistyle.dtx and sistyle.ins as
+% well as the derived file sistyle.sty. See the file 'readme.txt'
+% for a list of all the files as well as directions for the
+% installation of this package.
+% -------------------------------------------------------------------
+
+
+\def\batchfile{sistyle.ins}
+\def\filedate{2006/07/11}
+\input docstrip.tex
+\keepsilent
+
+\declarepreamble\DNJEpreamble
+
+-------------------------------------------------------------------
+ The SIstyle package
+ for SI units and number typesetting
+-------------------------------------------------------------------
+
+Author: Danie Els
+
+ Copyright (C) 2004-2006 Danie Els
+ All rights reserved.
+
+This work may be distributed and/or modified under the conditions
+of the LaTeX Project Public License, either version 1.3c of this
+license or (at your option) any later version. The latest version
+of this license is in:
+ http://www.latex-project.org/lppl/
+and version 1.3c or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
+
+This work has the LPPL maintenance status `maintained'.
+
+This Current Maintainer of this work is Danie Els (dnjels@sun.ac.za)
+---------------------------------------------------------------------
+
+\endpreamble
+
+\generate{%
+ \askforoverwritefalse
+ \usepreamble\DNJEpreamble
+ \file{sistyle.sty}{\from{sistyle.dtx}{package}}}
+
+\obeyspaces%
+\Msg{*********************************************************}
+\Msg{* *}
+\Msg{* To finish the installation you have to move the *}
+\Msg{* following file into a directory searched by TeX: *}
+\Msg{* *}
+\Msg{* sistyle.sty *}
+\Msg{* *}
+\Msg{* To produce the documentation run the file sistyle.dtx *}
+\Msg{* through LaTeX. *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{*********************************************************}
+\endbatchfile
|