summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fmtcount/fc-english.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/fmtcount/fc-english.def')
-rw-r--r--Master/texmf-dist/tex/latex/fmtcount/fc-english.def88
1 files changed, 52 insertions, 36 deletions
diff --git a/Master/texmf-dist/tex/latex/fmtcount/fc-english.def b/Master/texmf-dist/tex/latex/fmtcount/fc-english.def
index 026ad0e46f7..0b5f820ff30 100644
--- a/Master/texmf-dist/tex/latex/fmtcount/fc-english.def
+++ b/Master/texmf-dist/tex/latex/fmtcount/fc-english.def
@@ -7,7 +7,7 @@
%% fmtcount.dtx (with options: `fc-english.def,package')
%%
%% fmtcount.dtx
-%% Copyright 2013 Nicola Talbot and Vincent Belaïche
+%% Copyright 2014 Nicola Talbot and Vincent Belaïche
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -21,7 +21,7 @@
%%
%% The Current Maintainer of this work is Nicola Talbot and Vincent Belaïche.
%%
-%% This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fcnumparser.sty, fcprefix.sty, fmtcount.sty, fc-american.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def.
+%% This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fcnumparser.sty, fcprefix.sty, fmtcount.sty, fc-american.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def.
%%
%% \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
@@ -49,11 +49,11 @@
%%\cs{latinnumeralstringnum}\marg{number}\oarg{prefix options}
%%\end{definition}
\ProvidesFCLanguage{english}[2013/08/17]%
-\gdef\@ordinalMenglish#1#2{%
+\newcommand*\@ordinalMenglish[2]{%
\def\@fc@ord{}%
\@orgargctr=#1\relax
\@ordinalctr=#1%
-\@modulo{\@ordinalctr}{100}%
+\@FCmodulo{\@ordinalctr}{100}%
\ifnum\@ordinalctr=11\relax
\def\@fc@ord{th}%
\else
@@ -63,7 +63,7 @@
\ifnum\@ordinalctr=13\relax
\def\@fc@ord{th}%
\else
- \@modulo{\@ordinalctr}{10}%
+ \@FCmodulo{\@ordinalctr}{10}%
\ifcase\@ordinalctr
\def\@fc@ord{th}% case 0
\or \def\@fc@ord{st}% case 1
@@ -77,9 +77,10 @@
\fi
\edef#2{\number#1\relax\noexpand\fmtord{\@fc@ord}}%
}%
+\global\let\@ordinalMenglish\@ordinalMenglish
\global\let\@ordinalFenglish=\@ordinalMenglish
\global\let\@ordinalNenglish=\@ordinalMenglish
-\gdef\@@unitstringenglish#1{%
+\newcommand*\@@unitstringenglish[1]{%
\ifcase#1\relax
zero%
\or one%
@@ -93,7 +94,8 @@
\or nine%
\fi
}%
-\gdef\@@tenstringenglish#1{%
+\global\let\@@unitstringenglish\@@unitstringenglish
+\newcommand*\@@tenstringenglish[1]{%
\ifcase#1\relax
\or ten%
\or twenty%
@@ -106,7 +108,8 @@
\or ninety%
\fi
}%
-\gdef\@@teenstringenglish#1{%
+\global\let\@@tenstringenglish\@@tenstringenglish
+\newcommand*\@@teenstringenglish[1]{%
\ifcase#1\relax
ten%
\or eleven%
@@ -120,7 +123,8 @@
\or nineteen%
\fi
}%
-\gdef\@@Unitstringenglish#1{%
+\global\let\@@teenstringenglish\@@teenstringenglish
+\newcommand*\@@Unitstringenglish[1]{%
\ifcase#1\relax
Zero%
\or One%
@@ -134,7 +138,8 @@
\or Nine%
\fi
}%
-\gdef\@@Tenstringenglish#1{%
+\global\let\@@Unitstringenglish\@@Unitstringenglish
+\newcommand*\@@Tenstringenglish[1]{%
\ifcase#1\relax
\or Ten%
\or Twenty%
@@ -147,7 +152,8 @@
\or Ninety%
\fi
}%
-\gdef\@@Teenstringenglish#1{%
+\global\let\@@Tenstringenglish\@@Tenstringenglish
+\newcommand*\@@Teenstringenglish[1]{%
\ifcase#1\relax
Ten%
\or Eleven%
@@ -161,7 +167,8 @@
\or Nineteen%
\fi
}%
-\gdef\@@numberstringenglish#1#2{%
+\global\let\@@Teenstringenglish\@@Teenstringenglish
+\newcommand*\@@numberstringenglish[2]{%
\ifnum#1>99999
\PackageError{fmtcount}{Out of range}%
{This macro only works for values less than 100000}%
@@ -181,7 +188,7 @@ this number}%
\let\@@fc@numstr#2\relax
\edef#2{\@@fc@numstr\@tenstring{\@strctr}}%
\@strctr=#1 \divide\@strctr by 1000\relax
- \@modulo{\@strctr}{10}%
+ \@FCmodulo{\@strctr}{10}%
\ifnum\@strctr>0\relax
\let\@@fc@numstr#2\relax
\edef#2{\@@fc@numstr-\@unitstring{\@strctr}}%
@@ -189,7 +196,7 @@ this number}%
\else
\@strctr=#1\relax
\divide\@strctr by 1000\relax
- \@modulo{\@strctr}{10}%
+ \@FCmodulo{\@strctr}{10}%
\let\@@fc@numstr#2\relax
\edef#2{\@@fc@numstr\@teenstring{\@strctr}}%
\fi
@@ -201,7 +208,7 @@ this number}%
\edef#2{\@@fc@numstr\@unitstring{\@strctr}\ \@thousand}%
\fi
\fi
-\@strctr=#1\relax \@modulo{\@strctr}{1000}%
+\@strctr=#1\relax \@FCmodulo{\@strctr}{1000}%
\divide\@strctr by 100
\ifnum\@strctr>0\relax
\ifnum#1>1000\relax
@@ -211,7 +218,7 @@ this number}%
\let\@@fc@numstr#2\relax
\edef#2{\@@fc@numstr\@unitstring{\@strctr}\ \@hundred}%
\fi
-\@strctr=#1\relax \@modulo{\@strctr}{100}%
+\@strctr=#1\relax \@FCmodulo{\@strctr}{100}%
\ifnum#1>100\relax
\ifnum\@strctr>0\relax
\let\@@fc@numstr#2\relax
@@ -222,7 +229,7 @@ this number}%
\divide\@strctr by 10\relax
\let\@@fc@numstr#2\relax
\edef#2{\@@fc@numstr\@tenstring{\@strctr}}%
- \@strctr=#1\relax \@modulo{\@strctr}{10}%
+ \@strctr=#1\relax \@FCmodulo{\@strctr}{10}%
\ifnum\@strctr>0\relax
\let\@@fc@numstr#2\relax
\edef#2{\@@fc@numstr-\@unitstring{\@strctr}}%
@@ -239,12 +246,13 @@ this number}%
\edef#2{\@@fc@numstr\@unitstring{\@strctr}}%
\fi
\else
- \@modulo{\@strctr}{10}%
+ \@FCmodulo{\@strctr}{10}%
\let\@@fc@numstr#2\relax
\edef#2{\@@fc@numstr\@teenstring{\@strctr}}%
\fi
\fi
}%
+\global\let\@@numberstringenglish\@@numberstringenglish
\DeclareRobustCommand{\@numberstringMenglish}[2]{%
\let\@unitstring=\@@unitstringenglish
\let\@teenstring=\@@teenstringenglish
@@ -256,7 +264,7 @@ this number}%
\global\let\@numberstringMenglish\@numberstringMenglish
\global\let\@numberstringFenglish=\@numberstringMenglish
\global\let\@numberstringNenglish=\@numberstringMenglish
-\gdef\@NumberstringMenglish#1#2{%
+\newcommand*\@NumberstringMenglish[2]{%
\let\@unitstring=\@@Unitstringenglish
\let\@teenstring=\@@Teenstringenglish
\let\@tenstring=\@@Tenstringenglish
@@ -264,9 +272,10 @@ this number}%
\def\@andname{and}%
\@@numberstringenglish{#1}{#2}%
}%
+\global\let\@NumberstringMenglish\@NumberstringMenglish
\global\let\@NumberstringFenglish=\@NumberstringMenglish
\global\let\@NumberstringNenglish=\@NumberstringMenglish
-\gdef\@@unitthstringenglish#1{%
+\newcommand*\@@unitthstringenglish[1]{%
\ifcase#1\relax
zeroth%
\or first%
@@ -280,7 +289,8 @@ this number}%
\or ninth%
\fi
}%
-\gdef\@@tenthstringenglish#1{%
+\global\let\@@unitthstringenglish\@@unitthstringenglish
+\newcommand*\@@tenthstringenglish[1]{%
\ifcase#1\relax
\or tenth%
\or twentieth%
@@ -293,7 +303,8 @@ this number}%
\or ninetieth%
\fi
}%
-\gdef\@@teenthstringenglish#1{%
+\global\let\@@tenthstringenglish\@@tenthstringenglish
+\newcommand*\@@teenthstringenglish[1]{%
\ifcase#1\relax
tenth%
\or eleventh%
@@ -307,7 +318,8 @@ this number}%
\or nineteenth%
\fi
}%
-\gdef\@@Unitthstringenglish#1{%
+\global\let\@@teenthstringenglish\@@teenthstringenglish
+\newcommand*\@@Unitthstringenglish[1]{%
\ifcase#1\relax
Zeroth%
\or First%
@@ -321,7 +333,8 @@ this number}%
\or Ninth%
\fi
}%
-\gdef\@@Tenthstringenglish#1{%
+\global\let\@@Unitthstringenglish\@@Unitthstringenglish
+\newcommand*\@@Tenthstringenglish[1]{%
\ifcase#1\relax
\or Tenth%
\or Twentieth%
@@ -334,7 +347,8 @@ this number}%
\or Ninetieth%
\fi
}%
-\gdef\@@Teenthstringenglish#1{%
+\global\let\@@Tenthstringenglish\@@Tenthstringenglish
+\newcommand*\@@Teenthstringenglish[1]{%
\ifcase#1\relax
Tenth%
\or Eleventh%
@@ -348,7 +362,8 @@ this number}%
\or Nineteenth%
\fi
}%
-\gdef\@@ordinalstringenglish#1#2{%
+\global\let\@@Teenthstringenglish\@@Teenthstringenglish
+\newcommand*\@@ordinalstringenglish[2]{%
\@strctr=#1\relax
\ifnum#1>99999
\PackageError{fmtcount}{Out of range}%
@@ -370,18 +385,18 @@ this number}%
\edef#2{\@@fc@ordstr\@tenstring{\@strctr}}%
\@strctr=#1\relax
\divide\@strctr by 1000\relax
- \@modulo{\@strctr}{10}%
+ \@FCmodulo{\@strctr}{10}%
\ifnum\@strctr>0\relax
\let\@@fc@ordstr#2\relax
\edef#2{\@@fc@ordstr-\@unitstring{\@strctr}}%
\fi
\else
\@strctr=#1\relax \divide\@strctr by 1000\relax
- \@modulo{\@strctr}{10}%
+ \@FCmodulo{\@strctr}{10}%
\let\@@fc@ordstr#2\relax
\edef#2{\@@fc@ordstr\@teenstring{\@strctr}}%
\fi
- \@strctr=#1\relax \@modulo{\@strctr}{1000}%
+ \@strctr=#1\relax \@FCmodulo{\@strctr}{1000}%
\ifnum\@strctr=0\relax
\let\@@fc@ordstr#2\relax
\edef#2{\@@fc@ordstr\ \@thousandth}%
@@ -393,7 +408,7 @@ this number}%
\ifnum\@strctr>0\relax
\let\@@fc@ordstr#2\relax
\edef#2{\@@fc@ordstr\@unitstring{\@strctr}}%
- \@strctr=#1\relax \@modulo{\@strctr}{1000}%
+ \@strctr=#1\relax \@FCmodulo{\@strctr}{1000}%
\let\@@fc@ordstr#2\relax
\ifnum\@strctr=0\relax
\edef#2{\@@fc@ordstr\ \@thousandth}%
@@ -402,7 +417,7 @@ this number}%
\fi
\fi
\fi
-\@strctr=#1\relax \@modulo{\@strctr}{1000}%
+\@strctr=#1\relax \@FCmodulo{\@strctr}{1000}%
\divide\@strctr by 100
\ifnum\@strctr>0\relax
\ifnum#1>1000\relax
@@ -411,7 +426,7 @@ this number}%
\fi
\let\@@fc@ordstr#2\relax
\edef#2{\@@fc@ordstr\@unitstring{\@strctr}}%
- \@strctr=#1\relax \@modulo{\@strctr}{100}%
+ \@strctr=#1\relax \@FCmodulo{\@strctr}{100}%
\let\@@fc@ordstr#2\relax
\ifnum\@strctr=0\relax
\edef#2{\@@fc@ordstr\ \@hundredth}%
@@ -419,7 +434,7 @@ this number}%
\edef#2{\@@fc@ordstr\ \@hundred}%
\fi
\fi
-\@strctr=#1\relax \@modulo{\@strctr}{100}%
+\@strctr=#1\relax \@FCmodulo{\@strctr}{100}%
\ifnum#1>100\relax
\ifnum\@strctr>0\relax
\let\@@fc@ordstr#2\relax
@@ -429,14 +444,14 @@ this number}%
\ifnum\@strctr>19\relax
\@tmpstrctr=\@strctr
\divide\@strctr by 10\relax
- \@modulo{\@tmpstrctr}{10}%
+ \@FCmodulo{\@tmpstrctr}{10}%
\let\@@fc@ordstr#2\relax
\ifnum\@tmpstrctr=0\relax
\edef#2{\@@fc@ordstr\@tenthstring{\@strctr}}%
\else
\edef#2{\@@fc@ordstr\@tenstring{\@strctr}}%
\fi
- \@strctr=#1\relax \@modulo{\@strctr}{10}%
+ \@strctr=#1\relax \@FCmodulo{\@strctr}{10}%
\ifnum\@strctr>0\relax
\let\@@fc@ordstr#2\relax
\edef#2{\@@fc@ordstr-\@unitthstring{\@strctr}}%
@@ -453,12 +468,13 @@ this number}%
\edef#2{\@@fc@ordstr\@unitthstring{\@strctr}}%
\fi
\else
- \@modulo{\@strctr}{10}%
+ \@FCmodulo{\@strctr}{10}%
\let\@@fc@ordstr#2\relax
\edef#2{\@@fc@ordstr\@teenthstring{\@strctr}}%
\fi
\fi
}%
+\global\let\@@ordinalstringenglish\@@ordinalstringenglish
\DeclareRobustCommand{\@ordinalstringMenglish}[2]{%
\let\@unitthstring=\@@unitthstringenglish
\let\@teenthstring=\@@teenthstringenglish