summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fnumprint/fnumprint.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/fnumprint/fnumprint.sty')
-rw-r--r--Master/texmf-dist/tex/latex/fnumprint/fnumprint.sty60
1 files changed, 60 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/fnumprint/fnumprint.sty b/Master/texmf-dist/tex/latex/fnumprint/fnumprint.sty
new file mode 100644
index 00000000000..e20e228a486
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/fnumprint/fnumprint.sty
@@ -0,0 +1,60 @@
+%% See file 'fnumprint.dtx' for copyright and licence.
+\NeedsTeXFormat{LaTeX2e}[1998/12/01]
+\ProvidesPackage{fnumprint}
+ [2012/08/27 v1.1 Printing fancy numbers]
+\RequirePackage{xifthen}
+\RequirePackage[autolanguage]{numprint}
+\newcounter{fnumprint@language}
+\setcounter{fnumprint@language}{0}
+\DeclareOption{german}{\setcounter{fnumprint@language}{1}}
+\DeclareOption{ngerman}{\setcounter{fnumprint@language}{1}}
+\DeclareOption{english}{\setcounter{fnumprint@language}{2}}
+\DeclareOption{USenglish}{\setcounter{fnumprint@language}{2}}
+\DeclareOption{american}{\setcounter{fnumprint@language}{2}}
+\DeclareOption{UKenglish}{\setcounter{fnumprint@language}{2}}
+\DeclareOption{british}{\setcounter{fnumprint@language}{2}}
+\DeclareOption{canadian}{\setcounter{fnumprint@language}{2}}
+\DeclareOption{australian}{\setcounter{fnumprint@language}{2}}
+\DeclareOption{newzealand}{\setcounter{fnumprint@language}{2}}
+\ProcessOptions\relax
+\ifcase\value{fnumprint@language}
+ \PackageWarning{\@currname}{No supported language selected
+ \MessageBreak
+ This package supports only English and German
+ \MessageBreak
+ There will be no word names printed}
+\or
+ \RequirePackage{zahl2string}
+\or
+ \newcommand{\ns@en@neunzehn}[1]{%
+ \ifcase#1 zero\or one\or two\or three\or four\or five\or six\or%
+ seven\or eight\or nine\or ten\or eleven\or twelve\or thirteen\or%
+ fourteen\or fifteen\or sixteen\or seventeen\or%
+ eighteen\or nineteen\fi%
+ }
+\fi
+\DeclareRobustCommand{\fnumprint}[2][]{%
+ \ifthenelse{\NOT \(\isin{,}{#2} \OR \isin{.}{#2} \)
+ \AND -1 < #2 \AND #2 < 13}{%
+ \ifthenelse{\value{fnumprint@language} = 1}{%
+ \ifthenelse{\equal{#1}{ein} \AND #2 = 1}{ein}{\numstr{#2}}%
+ }{%
+ \ifthenelse{\value{fnumprint@language} = 2}{%
+ \ns@en@neunzehn{#2}%
+ }{\numprint{#2}}%
+ }%
+ }{\numprint{#2}}%
+}
+\DeclareRobustCommand{\fnumprintc}[2][]{%
+ \ifthenelse{-1 < \value{#2} \AND \value{#2} < 13}{%
+ \ifthenelse{\value{fnumprint@language} = 1}{%
+ \ifthenelse{\equal{#1}{ein} \AND \value{#2} = 1}{ein}{\numstring{#2}}}{%
+ \ifthenelse{\value{fnumprint@language} = 2}{%
+ \ns@en@neunzehn{\value{#2}}%
+ }{\cntprint{#2}}%
+ }%
+ }{\cntprint{#2}}%
+}
+\endinput
+%%
+%% End of file `fnumprint.sty'.