From a4799313350c8a85179bc99161cc49c0af3e1558 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Fri, 14 Sep 2012 22:14:50 +0000
Subject: new latex package fnumprint (14sep12)

git-svn-id: svn://tug.org/texlive/trunk@27668 c570f23f-e606-0410-a88d-b1316a301751
---
 .../texmf-dist/tex/latex/fnumprint/fnumprint.sty   | 60 ++++++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100644 Master/texmf-dist/tex/latex/fnumprint/fnumprint.sty

(limited to 'Master/texmf-dist/tex/latex/fnumprint/fnumprint.sty')

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'.
-- 
cgit v1.2.3

