diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-13 00:05:53 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-13 00:05:53 +0000 |
commit | 41f6accf239ea62e4f979c592c6728a616245d9f (patch) | |
tree | 82ddb0e632b70a669169fbeff04a0a83e9604fa5 /Master/texmf-dist/tex | |
parent | f5c952da6432767eac2421ed364423601fb9c844 (diff) |
sauerj
git-svn-id: svn://tug.org/texlive/trunk@1291 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/sauerj/collect.sty | 138 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/sauerj/metainfo.sty | 238 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/sauerj/optparams.sty | 27 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/sauerj/parcolumns.sty | 201 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/sauerj/processkv.sty | 33 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/sauerj/zahl2string.sty | 163 |
6 files changed, 800 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/sauerj/collect.sty b/Master/texmf-dist/tex/latex/sauerj/collect.sty new file mode 100644 index 00000000000..64d5adb5fc2 --- /dev/null +++ b/Master/texmf-dist/tex/latex/sauerj/collect.sty @@ -0,0 +1,138 @@ +%% +%% This is file `collect.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% collect.dtx (with options: `package') +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{collect} + [2004/09/12 v0.9 collect the contents of an environment] +\newcommand{\definecollection}[1]{% +\@ifundefined{CE@@#1@out}{% +\expandafter\newwrite\csname CE@@#1@out\endcsname% +\expandafter\newif\csname ifCE@@#1@open\endcsname% +\csname CE@@#1@openfalse\endcsname% +}{% +\PackageError{collect}{Collection `#1' has already % +been defined}{\@ehc}% +}% +} +\newenvironment{collect*}[5]{% +\global\toks@{}% +\def\CE@file{#1}% +\def\CE@preenv{#2}% +\def\CE@postenv{#3}% +\def\CE@prefileenv{#4}% +\def\CE@postfileenv{#5}% +\CE@get@env@body@start% +}{% +\CE@ensure@opened{\CE@file}% +\edef\@tempa{\csname CE@@\CE@file @out\endcsname}% +\immediate\write\@tempa{\CE@meaning\CE@prefileenv}% +\immediate\write\@tempa{\CE@meaning\CE@preenv}% +\immediate\write\@tempa{\the\toks@}% +\immediate\write\@tempa{\CE@meaning\CE@postenv}% +\immediate\write\@tempa{\CE@meaning\CE@postfileenv}% +\immediate\openout\CE@tmp@out=\jobname.tmp% +\immediate\write\CE@tmp@out{\CE@meaning\CE@preenv}% +\immediate\write\CE@tmp@out{\the\toks@}% +\immediate\write\CE@tmp@out{\CE@meaning\CE@postenv}% +\immediate\closeout\CE@tmp@out% +\@input{\jobname.tmp}% +\par% +} +\newenvironment{collect}[3]{% +\global\toks@{}% +\def\CE@file{#1}% +\def\CE@prefileenv{#2}% +\def\CE@postfileenv{#3}% +\CE@get@env@body@start% +}{% +\CE@ensure@opened{\CE@file}% +\edef\@tempa{\csname CE@@\CE@file @out\endcsname}% +\immediate\write\@tempa{\CE@meaning\CE@prefileenv}% +\immediate\write\@tempa{\the\toks@}% +\immediate\write\@tempa{\CE@meaning\CE@postfileenv}% +} +\newcommand{\includecollection}[1]{% +\CE@ensure@closed{#1}% +\@input{\jobname.#1}% +} +\newenvironment{collectinmacro}[3]{% +\def\CE@destmacro{#1}% +\def\CE@postenv{#3}% +\toks@{#2}% +\CE@get@env@body@start% +}{% +\toks@\expandafter\expandafter\expandafter{% +\expandafter\the\expandafter\toks@\CE@postenv}% +\expandafter\expandafter\expandafter% +\gdef\expandafter\CE@destmacro\expandafter{\the\toks@}% +\toks@{}% +} +\newwrite\CE@tmp@out +\def\CE@get@env@body@start{% +\let\@tempa\CE@get@env@body% +\futurelet\@tempb\CE@get@env@body@start@% +} +\def\CE@get@env@body@start@{% +\ifx\@tempb\@sptoken% +\expandafter\CE@get@env@body@start@@% +\else% +\expandafter\CE@get@env@body% +\fi% +} +\def\CE@get@env@body@start@@{% +\afterassignment\CE@get@env@body% +\let\@tempb= % +} +\bgroup +\catcode`\Q=3 +\long\gdef\CE@get@env@body#1\end#2{% +\def\@tempb{#2}% +\ifx\@tempb\@currenvir% +\CE@get@env@body@#1Q Q% +\def\@tempa{\end{#2}}% +\else +\toks@\expandafter{\the\toks@#1\end{#2}}% +\fi% +\@tempa% +} +\long\gdef\CE@get@env@body@#1 Q{% +\CE@get@env@body@@#1Q% +} + +\long\gdef\CE@get@env@body@@#1Q#2{% +\toks@\expandafter{\the\toks@#1}% +} +\egroup +\long\def\CE@meaning#1{% +\expandafter\strip@prefix\meaning#1% +} +\def\CE@ensure@opened#1{% +\@ifundefined{ifCE@@#1@open}{% +\PackageError{collect}{Collection `#1' has not been defined}{\@ehc}% +}{% +\csname ifCE@@#1@open\endcsname\else% +\expandafter\immediate\expandafter\openout% +\csname CE@@#1@out\endcsname=\jobname.#1% +\expandafter\global\csname CE@@#1@opentrue\endcsname% +\fi% +}% +} +\def\CE@ensure@closed#1{% +\@ifundefined{ifCE@@#1@open}{% +\PackageError{collect}{Collection `#1' has not been defined}{\@ehc}% +}{% +\csname ifCE@@#1@open\endcsname% +\expandafter\immediate\expandafter\closeout% +\csname CE@@#1@out\endcsname% +\expandafter\global\csname CE@@#1@openfalse\endcsname% +\fi% +}% +} +\endinput +%% +%% End of file `collect.sty'. diff --git a/Master/texmf-dist/tex/latex/sauerj/metainfo.sty b/Master/texmf-dist/tex/latex/sauerj/metainfo.sty new file mode 100644 index 00000000000..3f5bb20ed1e --- /dev/null +++ b/Master/texmf-dist/tex/latex/sauerj/metainfo.sty @@ -0,0 +1,238 @@ +%% +%% This is file `metainfo.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% metainfo.dtx (with options: `package') +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{metainfo} + [2004/11/25 v0.9.1 typeset document metainfo] +\newcommand{\typesetmetainfo}[1]{% +\bgroup% +\mi@activenewline% +\mi@emptyactivepercent% +\mi@otherbraces% +\ifmi@indexmacros\mi@activehat\fi% +\let\mi@old@verbatim\@verbatim% +\def\@verbatim{% +\mi@old@verbatim% +\mi@verbatimnewline% +}% +\expandafter\mi@skiplines\@@input#1\relax% +\egroup% +} +\def\mi@@MIbeginnings{\chapter\section\subsection\subsubsection} +\def\mi@@firstlocalMItext{\textbf{Annotations:}\par\noindent} +\def\mi@@lastlocalMItext{} +\def\mi@@everylocalMItext{} +\DeclareOption{compactheadings}{% +\@ifundefined{thechapter}{}{% +\def\chapter{\@startsection{chapter}{0}{\z@}{-2\baselineskip}% +{\baselineskip}{\normalfont\normalsize\bfseries}}% +}% +\def\section{\@startsection{section}{1}{\z@}{-2\baselineskip}% +{\baselineskip}{\normalfont\normalsize\bfseries}}% +\def\subsection{\@startsection{subsection}{2}{\z@}{-2\baselineskip}% +{\baselineskip}{\normalfont\normalsize\bfseries}}% +\def\subsubsection{\@startsection{subsubsection}{3}{\z@}% +{-2\baselineskip}{\baselineskip}% +{\normalfont\normalsize\bfseries}}% +} +\newif\ifmi@indexmacros +\mi@indexmacrosfalse +\DeclareOption{indexshorthand}{% +\mi@indexmacrostrue% +\let\mi@@@hat^% +\def\mi@hat{% +\ifmmode% +\expandafter\mi@@@hat% +\else% +\expandafter\futurelet\expandafter\@tempa\expandafter\mi@hat@% +\fi% +} +\def\mi@hat@{% +\ifx\@tempa\mi@hat% +\expandafter\mi@hat@twohats% +\else\ifx\@tempa\bgroup% +\expandafter\expandafter\expandafter\mi@indextypeset% +\else% +\mi@hat@errbrace% +\fi\fi% +} +\def\mi@hat@twohats#1{% +\futurelet\@tempa\mi@hat@twohats@% +} +\def\mi@hat@twohats@{% +\ifx\@tempa\bgroup% +\expandafter\index% +\else% +\mi@hat@errbrace% +\fi% +} +\def\mi@indextypeset#1{% +#1\index{#1}% +} +\def\mi@hat@errbrace{% +\PackageError{metainfo}{`\string^' or `\string^\string^' not % +followed by a left brace}\@ehc% +} +} +\DeclareOption{listlocalmetainfo}{% +\def\mi@@firstlocalMItext{% +\begin{itemize}% +}% +\def\mi@@lastlocalMItext{% +\end{itemize}% +}% +\def\mi@@everylocalMItext{% +\item\relax% +}% +} +\ProcessOptions\relax +\newif\ifmi@firstlocalMI +\mi@firstlocalMItrue +\def\mi@skiplines#1{% +\ifx#1\mi@percentempty% +\expandafter\mi@checkbeginlocalMI% +\else\ifcat\noexpand#1\relax% +\expandafter\expandafter\expandafter\mi@checkbeginMI% +\else% +\expandafter\expandafter\expandafter\mi@gobbletolineend% +\fi\fi% +#1% +} +\bgroup +\catcode`\^^M=\active% +\gdef\mi@typesetMI{% +\mi@normalbraces% +\let^^M\mi@typesetMI@checkend% +\ignorespaces% +} +\long\gdef\mi@typesetMI@checkend#1{% +\ifx#1\mi@percentempty% +\expandafter\mi@typesetMI@checkend@% +\else% +\mi@otherbraces% +\let^^M\@empty% +\expandafter\mi@skiplines\expandafter#1% +\fi% +} +\long\gdef\mi@typesetMI@checkend@#1{% +\ifx#1\mi@typesetMI@checkend% +\par\expandafter\mi@typesetMI@checkend% +\else% +\space% +\expandafter#1% +\fi% +} +\gdef\mi@checkbeginMI#1{% +\ifx#1\end% +\expandafter\mi@checkdocumentend% +\else% +\def\@tempa##1#1##2\@nil{\mi@checkbeginMI@{##2}#1}% +\expandafter\expandafter\expandafter\@tempa% +\expandafter\mi@@MIbeginnings\expandafter#1% +\expandafter\@nil% +\fi% +} +\gdef\mi@checkbeginMI@#1#2{% +\ifx^^M#1^^M% +\expandafter\mi@gobbletolineend% +\else% +\ifmi@firstlocalMI\else\mi@@lastlocalMItext\fi% +\let^^M\mi@checkbeginMI@@% +\mi@normalbraces% +\mi@normalpercent% +\mi@firstlocalMItrue% +\expandafter#2% +\fi% +} +\gdef\mi@checkbeginMI@@{% +\let^^M\@empty% +\mi@otherbraces% +\mi@emptyactivepercent% +\mi@checkbeginMI@@@% +} +\egroup +\def\mi@checkbeginMI@@@#1{% +\ifx#1\mi@percentempty% +\par% +\expandafter\mi@typesetMI% +\else% +\expandafter\mi@skiplines\expandafter#1% +\fi% +} +\def\mi@checkbeginlocalMI#1#2{% +\ifx#2\mi@percentempty% +\par% +\ifmi@firstlocalMI\mi@@firstlocalMItext\fi% +\mi@@everylocalMItext% +\mi@firstlocalMIfalse% +\expandafter\mi@typesetMI% +\else% +\expandafter\mi@gobbletolineend\expandafter#2% +\fi% +} +\def\mi@checkdocumentend{% +\mi@normalbraces% +\mi@checkdocumentend@% +} +\def\mi@checkdocumentend@#1{% +\def\@tempa{#1}% +\ifx\@tempa\mi@textdocument% +\ifmi@firstlocalMI\else\mi@@lastlocalMItext\fi% +\expandafter\mi@gobbletolineend@any\expandafter\endinput% +\else% +\mi@otherbraces% +\expandafter\mi@skiplines% +\fi% +} +\def\mi@textdocument{document} +\def\mi@percentempty{\@empty} +\bgroup +\catcode`\^^M=\active% +\gdef\mi@gobbletolineend{% +\mi@gobbletolineend@any\mi@skiplines% +} +\long\gdef\mi@gobbletolineend@any#1#2^^M{% +#1% +} +\egroup +\bgroup +\catcode`\|=14 % +\catcode`\^^M=\active% +\catcode`\%=\active| +\gdef\mi@activenewline{| +\catcode`\^^M=\active| +\let^^M\@empty| +}| +\gdef\mi@verbatimnewline{| +\catcode`\^^M=\active| +\def^^M{\par\@gobbletwo}| +}| +\gdef\mi@emptyactivepercent{| +\catcode`\%=\active| +\let%\mi@percentempty| +}| +\catcode`\^=\active| +\gdef\mi@activehat{| +\catcode`\^\active| +\let^\mi@hat| +}| +\egroup +\def\mi@normalpercent{% +\catcode`\%=14 % +} +\def\mi@otherbraces{% +\catcode`\{=12 % +\catcode`\}=12 % +} +\def\mi@normalbraces{% +\catcode`\{=1 % +\catcode`\}=2 % +} +\endinput +%% +%% End of file `metainfo.sty'. diff --git a/Master/texmf-dist/tex/latex/sauerj/optparams.sty b/Master/texmf-dist/tex/latex/sauerj/optparams.sty new file mode 100644 index 00000000000..bf8ee0aad8a --- /dev/null +++ b/Master/texmf-dist/tex/latex/sauerj/optparams.sty @@ -0,0 +1,27 @@ +%% +%% This is file `optparams.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% optparams.dtx (with options: `package') +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{optparams} + [2004/08/14 v0.9 multiple optional parameters in macros] +\newcommand{\optparams}[2]{% +\optparams@{#1}{}{#2}% +} +\def\optparams@#1#2#3{% +\@ifnextchar[{% +\optparams@@{#1}{#2}#3\@nil% +}{% +#1#2#3% +}% +} +\def\optparams@@#1#2[#3]#4\@nil[#5]{% +\optparams@{#1}{#2[#5]}{#4}% +} +\endinput +%% +%% End of file `optparams.sty'. diff --git a/Master/texmf-dist/tex/latex/sauerj/parcolumns.sty b/Master/texmf-dist/tex/latex/sauerj/parcolumns.sty new file mode 100644 index 00000000000..992daaa0afd --- /dev/null +++ b/Master/texmf-dist/tex/latex/sauerj/parcolumns.sty @@ -0,0 +1,201 @@ +%% +%% This is file `parcolumns.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% parcolumns.dtx (with options: `package') +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{parcolumns} + [2004/11/25 v1.2 Typeset multiple parallel columns] +\RequirePackage{processkv}[2004/08/05] +\newcount\pc@columnctr +\newcount\pc@columncount +\newif\ifpc@rulebetween +\newtoks\pc@everypar +\def\pc@boolkey#1#2{% +\edef\@tempa{#2}% +\edef\@tempb{false}% +\ifx\@tempa\@tempb% +\csname #1false\endcsname% +\else% +\csname #1true\endcsname% +\fi% +} +\define@key{parcolumns}{distance}{% +\@tempdimc#1\relax% +} +\define@key{parcolumns}{rulebetween}[true]{% +\pc@boolkey{pc@rulebetween}{#1}% +} +\define@key{parcolumns}{nofirstindent}[true]{% +\pc@boolkey{@tempswa}{#1}% +\if@tempswa\pc@everypar{{\setbox\z@\lastbox}\everypar{}}\fi% +} +\define@key{parcolumns}{sloppy}[true]{% +\pc@boolkey{@tempswa}{#1}% +\if@tempswa% +\hbadness\@M% +\tolerance\@M% +\fi% +} +\define@key{parcolumns}{sloppyspaces}[true]{% +\pc@boolkey{@tempswa}{#1}% +\if@tempswa% +\spaceskip.3333em\@plus1em % +\fi% +} +\define@key{parcolumns}{colwidths}{% +\toks@{#1}% +} +\newenvironment{parcolumns}[2][]{% +\pc@rulebetweenfalse% +\@tempswafalse% +\@tempdimc2em\relax% +\toks@{}% +\setkeys{parcolumns}{#1}% +\pc@columncount#2 % +\pc@columnctr\z@% +\pc@alloccolumns% +\pc@setcolumnwidths% +\endgraf% +\@nobreakfalse% +\global\everypar{}% +}{% +\colplacechunks% +\endgraf% +\global\clubpenalty\@clubpenalty% +\@doendpe% +} +\newcommand{\colchunk}{\@testopt\colchunk@{}}% +\long\def\colchunk@[#1]#{% +\ifx\\#1\\% +\advance\pc@columnctr\@ne% +\else% +\pc@columnctr#1\relax% +\fi% +\ifnum\pc@columnctr>\pc@columncount% +\PackageError{parcolumns}{The column \number\pc@columnctr\space% +is too large}{Only \number\pc@columncount\space columns are% +\space allowed.} +\pc@columnctr\pc@columncount% +\fi% +\clubpenalty\z@% +\interlinepenalty\z@% +\displaywidowpenalty\z@% +\widowpenalty\z@% +\brokenpenalty\z@% +\everypar\expandafter{\the\pc@everypar}% +\afterassignment\pc@setcolumnwidth% +\expandafter\setbox\csname pc@column@\number\pc@columnctr\endcsname% +\vbox% +} +\newcommand{\colplacechunks}{% +\ifnum\pc@columnctr>\z@% +\pc@placeboxes% +\pc@columnctr\z@% +\pc@everypar{}% +\fi% +} +\def\pc@placeboxes{% +\global\let\@tempa\relax% +\count@\z@% +\hb@xt@\linewidth{% +\vfuzz30ex % +\vbadness\@M% +\splittopskip\z@skip% +\loop\ifnum\count@<\pc@columncount% +\advance\count@\@ne% +\expandafter\ifvoid\csname pc@column@\number\count@% +\endcsname% +\hskip\csname pc@column@width@\number\count@\endcsname% +\else% +\expandafter\setbox\expandafter\@tempboxa\expandafter% +\vsplit\csname pc@column@\number\count@\endcsname% +to \dp\strutbox% +\vbox{\unvbox\@tempboxa}% +\fi% +\expandafter\ifvoid\csname pc@column@\number\count@% +\endcsname\else% +\global\let\@tempa\pc@placeboxes% +\fi% +\ifnum\count@<\pc@columncount% +\strut% +\hfill% +\ifpc@rulebetween% +\vrule% +\hfill% +\fi% +\fi% +\repeat% +}% +\@tempa% +} +\def\pc@alloccolumns{% +\count@\z@% +\loop\ifnum\count@<\pc@columncount% +\advance\count@\@ne% +\@ifundefined{pc@column@\number\count@}{% +\expandafter\newbox\csname pc@column@\number\count@% +\endcsname% +\expandafter\newdimen\csname pc@column@width@\number% +\count@\endcsname% +}{% +\setbox0\box\csname pc@column@\number\count@\endcsname% +\csname pc@column@width@\number\count@\endcsname\z@% +}% +\repeat% +} +\def\pc@setcolumnwidths{% +\expandafter\processkeyvalues\expandafter{\the\toks@}% +\pc@setsinglecolwidth% +\@tempdima\z@% +\@tempcnta\z@% +\count@\z@% +\loop\ifnum\count@<\pc@columncount% +\advance\count@\@ne% +\@tempdimb\csname pc@column@width@\number\count@\endcsname% +\advance\@tempdima\@tempdimb% +\ifnum\@tempdimb=\z@% +\advance\@tempcnta\@ne% +\else% +\PackageInfo{parcolumns}{Width of column \number\count@% +\space set to \the\@tempdimb} +\fi% +\repeat% +\ifnum\@tempcnta>\z@% +\@tempdimb\@tempdimc% +\multiply\@tempdimb\pc@columncount% +\advance\@tempdimb-\@tempdimc% +\advance\@tempdimb\@tempdima% +\@tempdima\linewidth% +\advance\@tempdima-\@tempdimb% +\divide\@tempdima\@tempcnta% +\count@\z@% +\loop\ifnum\count@<\pc@columncount% +\advance\count@\@ne% +\ifnum\csname pc@column@width@\number\count@\endcsname=\z@% +\csname pc@column@width@\number\count@\endcsname\@tempdima% +\PackageInfo{parcolumns}{Width of column \number\count@% +\space calculated as \the\@tempdima} +\fi% +\repeat% +\fi% +} +\def\pc@setsinglecolwidth#1#2{% +\@ifundefined{pc@column@width@\number#1}{ +\PackageError{parcolumns}{`#1' is not a valid column number!}% +{\@ehc}% +}{% +\csname pc@column@width@\number#1\endcsname=#2\relax% +}% +} +\def\pc@setcolumnwidth{% +\hsize\csname pc@column@width@\number\pc@columnctr\endcsname% +\linewidth\hsize% +\leavevmode% +} +\endinput +%% +%% End of file `parcolumns.sty'. diff --git a/Master/texmf-dist/tex/latex/sauerj/processkv.sty b/Master/texmf-dist/tex/latex/sauerj/processkv.sty new file mode 100644 index 00000000000..6acfa93425e --- /dev/null +++ b/Master/texmf-dist/tex/latex/sauerj/processkv.sty @@ -0,0 +1,33 @@ +%% +%% This is file `processkv.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% processkv.dtx (with options: `package') +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{processkv} + [2004/08/09 v1.0.1 process key=value lists] +\RequirePackage{keyval}[1999/03/16] +\def\processkeyvalues#1#2{% +\def\PKV@process{#2}% +\PKV@do#1,\relax,% +} +\def\PKV@do#1,{% +\ifx\relax#1\empty\else% +\PKV@split#1==\relax% +\expandafter\PKV@do\fi% +} +\def\PKV@split#1=#2=#3\relax{% +\KV@@sp@def\@tempa{#1}% +\ifx\@tempa\@empty\else% +\KV@@sp@def\@tempb{#2}% +\expandafter\expandafter\expandafter\PKV@process% +\expandafter\expandafter\expandafter{\expandafter\@tempa% +\expandafter}\expandafter{\@tempb}% +\fi% +} +\endinput +%% +%% End of file `processkv.sty'. diff --git a/Master/texmf-dist/tex/latex/sauerj/zahl2string.sty b/Master/texmf-dist/tex/latex/sauerj/zahl2string.sty new file mode 100644 index 00000000000..d01da1afad8 --- /dev/null +++ b/Master/texmf-dist/tex/latex/sauerj/zahl2string.sty @@ -0,0 +1,163 @@ +%% +%% This is file `zahl2string.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% zahl2string.dtx (with options: `package') +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{zahl2string} + [2004/11/25 v1.2.1 format a number as german words] +\newcommand{\numstring}[1]{% +\expandafter\@numstring\csname c@#1\endcsname% +} +\newcommand{\Numstring}[1]{% +\expandafter\@Numstring\csname c@#1\endcsname% +} +\newcommand{\ordstring}[1]{% +\expandafter\@ordstring\csname c@#1\endcsname% +} +\newcommand{\Ordstring}[1]{% +\expandafter\@Ordstring\csname c@#1\endcsname% +} +\newcommand{\@numstring}[1]{% +\ns@numstr{#1}\ns@neunzehns{null}{}% +} +\newcommand\@Numstring[1]{% +\expandafter\@@Numstring\expandafter{\number#1}% +} +\DeclareRobustCommand{\@@Numstring}[1]{% +\protected@edef\@tempa{\@numstring{#1}}% +\expandafter\MakeUppercase\@tempa% +} +\newcommand{\@ordstring}[1]{% +\ns@numstr{#1}\ns@neunzehnord{null\-te}{te}% +} +\newcommand{\@Ordstring}[1]{% +\expandafter\@@Ordstring\expandafter{\number#1}% +} +\DeclareRobustCommand{\@@Ordstring}[1]{% +\protected@edef\@tempa{\@ordstring{#1}}% +\expandafter\MakeUppercase\@tempa% +} +\let\numstr\@numstring% +\let\Numstr\@Numstring% +\let\ordstr\@ordstring% +\let\Ordstr\@Ordstring% +\DeclareOption{publicnumstr}{% +\PackageWarning{zahl2string}{Option `publicnumstr' is % +deprecated and will be removed in version 1.3}% +} +\def\ns@numoutofrange#1#2{% +\number#1#2% +} + +\DeclareOption{showrangeerrors}{% +\def\ns@numoutofrange#1#2{% +\PackageError{zahl2string}{The number `#1' is too large % +to be formatted using zahl2string}{The largest possible % +number is 999,999,999.} +}% +} +\ProcessOptions\relax +\def\ns@numstr#1#2#3#4{% +\ifnum\number#1<\@ne% +#3% +\else\ifnum\number#1<1000000000 % +\expandafter\ns@numstring\expandafter{\number#1}#2% +\else% +\ns@numoutofrange{#1}{#4}% +\fi\fi% +} +\def\ns@numstring#1#2{% +\expandafter\ns@@numstring% +\ifcase% +\ifnum#1<10 1% +\else\ifnum#1<100 2% +\else\ifnum#1<\@m 3% +\else\ifnum#1<\@M 4% +\else\ifnum#1<100000 5% +\else\ifnum#1<1000000 6% +\else\ifnum#1<10000000 7% +\else\ifnum#1<100000000 8% +\else9% +\fi\fi\fi\fi\fi\fi\fi\fi % +\or00000000#1% case 1: Add 8 leading zeros +\or0000000#1% case 2: Add 7 leading zeros +\or000000#1% case 3: Add 6 leading zeros +\or00000#1% case 4: Add 5 leading zeros +\or0000#1% case 5: Add 4 leading zeros +\or000#1% case 6: Add 3 leading zeros +\or00#1% case 7: Add 2 leading zeros +\or0#1% case 8: Add 1 leading zero +\or#1% case 9: Add no leading zeros +\or% +\@nil#2% +\fi% +} +\def\ns@@numstring#1#2#3#4#5#6#7\or#8\@nil#9{% +\ifnum#1#2#3>\z@ +\ns@million#1#2#3% +\ifnum#4#5#6>\z@\space\fi% +\fi% +\ifnum#4#5#6>\z@% +\ns@hundred#4#5#6{#1#2#3}{#4#5}\ns@neunzehn% +\ifnum#4#5#6>\@ne\-\fi% +tau\-send% +\ifnum#7>\z@\-\fi% +\fi% +\ns@hundred#7{#4#5#6}1#9% +} +\def\ns@million#1#2#3{% +\ifnum#1#2#3=\@ne% +\ns@hundred#1#2#301\ns@neunzehne% +\space% +Mil\-lion% +\else% +\ns@hundred#1#2#301\ns@neunzehns% +\space% +Mil\-lio\-nen% +\fi% +} +\def\ns@hundred#1#2#3#4#5#6{% +\ifnum#1>\z@% +\ifnum#4#1>\@ne\ns@neunzehn#1\-\fi% +hun\-dert% +\ifnum#2#3>\z@\-\fi% +\fi% +\ifnum#2#3<20 % +\ifnum#5#2#3>\@ne#6{#2#3}\fi% +\else% +\ifnum#3>\z@\ns@neunzehn#3\-und\-\fi% +\ns@neunzig#2% +#60% +\fi% +} +\def\ns@neunzehn#1{% +\ifcase#1\@empty\or ein\or zwei\or drei\or vier\or f\"unf\or sechs\or% +sie\-ben\or acht\or neun\or zehn\or elf\or zw\"olf\or drei\-zehn\or% +vier\-zehn\or f\"unf\-zehn\or sech\-zehn\or sieb\-zehn\or% +acht\-zehn\or neun\-zehn\fi% +} +\def\ns@neunzehns#1{% +\ifcase#1\@empty\or eins\else\ns@neunzehn{#1}\fi% +} +\def\ns@neunzehne#1{% +\ifcase#1\@empty\or ei\-ne\else\ns@neunzehn{#1}\fi% +} +\def\ns@neunzehnord#1{% +\ifcase#1\-ste\or er\-ste\or zwei\-te\or drit\-te\or vier\-te\or% +f\"unf\-te\or sech\-ste\or sieb\-te\or ach\-te\or neun\-te\or% +zehn\-te\or elf\-te\or zw\"olf\-te\or drei\-zehn\-te\or% +vier\-zehn\-te\or f\"unf\-zehn\-te\or sech\-zehn\-te\or% +sieb\-zehn\-te\or acht\-zehn\-te\or neun\-zehn\-te\fi% +} +\def\ns@neunzig#1{% +\ifcase#1\or\or zwan\-zig\or drei\ss ig\or vier\-zig\or% +f\"unf\-zig\or sech\-zig\or sieb\-zig\or acht\-zig\or% +neun\-zig\fi% +} +\endinput +%% +%% End of file `zahl2string.sty'. |