diff options
author | Karl Berry <karl@freefriends.org> | 2008-04-25 16:54:55 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-04-25 16:54:55 +0000 |
commit | 50cb8838d9b17bec22be4d5c2d71828a8ad0dd17 (patch) | |
tree | 691e508cfb0ae80627aedf5709f8251e7da46505 /Master | |
parent | 2fe5de903b52da3cee415c7406cecd31fda6ac5e (diff) |
new latex packge isonums (24apr08)
git-svn-id: svn://tug.org/texlive/trunk@7646 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/tex/latex/isonums/isonums.sty | 132 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkg-ctan-check | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc | 1 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/isonums.tlpsrc | 2 |
4 files changed, 136 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/isonums/isonums.sty b/Master/texmf-dist/tex/latex/isonums/isonums.sty new file mode 100644 index 00000000000..2bdac074902 --- /dev/null +++ b/Master/texmf-dist/tex/latex/isonums/isonums.sty @@ -0,0 +1,132 @@ +% +% isonums.sty v1.0, based on ziffer.sty v2.2 +% +% Author: +% +% M. V\"ath vaeth()mathematik.uni-wuerzburg.de +% +% Adapted to handle English formatted numbers: +% +% Luis Rivera jlrn77()gmail.com +% +% This package provides the macros +% \ZifferAn (equivalent with \ZifferPunktAn \ZifferStrichAn ) +% \ZifferAus (equivalent with \ZifferPunktAus\ZifferStrichAus) +% \ZifferPunktAn +% \ZifferPunktAus +% \ZifferStrichAn +% \ZifferStrichAus +% +% If \ZifferAn was used, then in numbers in math-mode the following happens: +% `.' is used as a `one-thousand separator' as common in Germany +% `,' is used as a decimal separator as common in Germany +% `--' generates a -- with better spacing (e.g. in 1.000,-- ) +% +% You may still use the symbols `.' `,' and `-' in other context in math mode. +% +% The first two conversions are switched on by default, the last conversion has +% to be switched on explicitly (this has been changed in v2.1): +% You may switch on/off the conversions with +% \ZifferPunktAn/\ZifferPunktAus (for the first two conversions) respectively +% \ZifferStrichAn/\ZifferStrichAus (for the last conversion). +% +% The reason why the last conversion is not on by default (and why it might be +% necessary to [temporarily] switch off a conversion) is that certain packages +% (in particular, newer versions of amsmath) cause problems with it. +% +% There were some discussions which should be the correct output of the +% above conversions (in particular, of `--'). +% If you do not like my choice: You may customize (i.e. redefine) the macros +% \ZifferLeer and \ZifferStrich +% after loading the package to produce the `one-thousand separator' +% respectively the `--'. +% +% All above command-names are in German, because I had expected that this +% package is only needed for German texts. Meanwhile, I learned that also +% other countries use this strange convention for numbers. However, for +% downward compatibility, I decided to keep the name conventions anyway +% (after all, the name of the package is in German anyway). +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% The extension options (euro,anglo) define the input format, so that all numbers +% in math mode are displayed in ISO-31-0 format, regardless of input format. +% The commands \EuroZiffer and \AngloZiffer make local changes within the document body. +% I wrote these extensions as I use the decimal point consistently and I found +% convenient to make conversions to all numbers simply by adjusting a command line +% in the whole document.--- Luis. +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{isonums}[2007/12/31 v1.0 Ziffer for automated ISO number format] +\makeatletter +\ifx\newcommand\undefined\else + \newcommand{\ZifferAn}{} + \newcommand{\ZifferAus}{} + \newcommand{\ZifferPunktAn}{} + \newcommand{\ZifferPunktAus}{} + \newcommand{\ZifferStrichAn}{} + \newcommand{\ZifferStrichAus}{} + \newcommand{\ZifferLeer}{} + \newcommand{\ZifferStrich}{} +\fi + +\def\ZifferAn{\ZifferPunktAn\ZifferStrichAn} +\def\ZifferAus{\ZifferPunktAus\ZifferStrichAus} +\def\ZifferPunktAn{\mathcode`,="8000\mathcode`.="8000\relax} +\def\ZifferPunktAus{\mathcode`,="613B\mathcode`.="013A\relax} +\def\ZifferStrichAn{\mathcode`-="8000\relax} +\def\ZifferStrichAus{\mathcode`-="2200\relax} +\def\ZifferLeer{\,} +\ifx\textrm\undefined + \def\ZifferStrich{\hbox{-\kern0.1em-}} +\else + \def\ZifferStrich{\textrm{-\kern0.1em-}} +\fi + +\mathchardef\ziffer@CommaMy="013B +\mathchardef\ziffer@CommaOri="613B +\mathchardef\ziffer@DotOri="013A +\mathchardef\ziffer@MinusOri="2200 +{\ZifferAn + \catcode`\,=\active\gdef,{\begingroup\obeyspaces\futurelet\n\ziffer@ccheck} + \catcode`\.=\active\gdef.{\begingroup\obeyspaces\futurelet\n\ziffer@dcheck} + \catcode`\-=\active\gdef-{\begingroup\obeyspaces\futurelet\n\ziffer@mcheck}} +\newcommand{\EuroZiffer}{% + \def\ziffer@ccheck{\ziffer@check\ziffer@CommaMy\ziffer@CommaOri}% + \def\ziffer@dcheck{\ziffer@check\ZifferLeer\ziffer@DotOri}% + } +\DeclareOption{euro}{\EuroZiffer} +\newcommand{\AngloZiffer}{% + \def\ziffer@dcheck{\ziffer@check\ziffer@CommaMy\ziffer@CommaOri}% + \def\ziffer@ccheck{\ziffer@check\ZifferLeer\ziffer@CommaOri}% + } +\DeclareOption{anglo}{\AngloZiffer} +\def\ziffer@mcheck{\ifx\n-\def\n-{\endgroup\ZifferStrich}% + \else\def\n{\endgroup\ziffer@MinusOri}\fi\n} +\def\ziffer@check#1#2{% + \ifx\n1\endgroup#1\else + \ifx\n2\endgroup#1\else + \ifx\n3\endgroup#1\else + \ifx\n4\endgroup#1\else + \ifx\n5\endgroup#1\else + \ifx\n6\endgroup#1\else + \ifx\n7\endgroup#1\else + \ifx\n8\endgroup#1\else + \ifx\n9\endgroup#1\else + \ifx\n0\endgroup#1\else + \endgroup#2% + \fi + \fi + \fi + \fi + \fi + \fi + \fi + \fi + \fi + \fi} +\ZifferPunktAn +\makeatother +\ExecuteOptions{anglo} +\ProcessOptions +\endinput
\ No newline at end of file diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 6ec2a7e97f8..4765f35b920 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -99,7 +99,7 @@ my @WorkingTLP = qw( ibygrk icsv IEEEconf IEEEtran ifplatform ifxetex ijmart ijqc image-gallery inlinebib interactiveworkbook inversepath invoice - iopart-num isodoc isorot isotope itnumpar iwona + iopart-num isodoc isonums isorot isotope itnumpar iwona jeopardy jknapltx jneurosci jpsj jurabib juramisc jurarsp kalender kerkis kerntest keystroke koma-script kpfonts l2picfaq l2tabu-english l2tabu-spanish diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc index ea9feefbd46..c953c3fb9ec 100644 --- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc @@ -241,6 +241,7 @@ depend ipa depend iso depend iso10303 depend isodate +depend isonums depend isodoc depend isorot depend isotope diff --git a/Master/tlpkg/tlpsrc/isonums.tlpsrc b/Master/tlpkg/tlpsrc/isonums.tlpsrc new file mode 100644 index 00000000000..f60b84dc430 --- /dev/null +++ b/Master/tlpkg/tlpsrc/isonums.tlpsrc @@ -0,0 +1,2 @@ +name isonums +category Package |