diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/fmtcount/fc-french.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/fmtcount/fc-french.def | 572 |
1 files changed, 307 insertions, 265 deletions
diff --git a/Master/texmf-dist/tex/latex/fmtcount/fc-french.def b/Master/texmf-dist/tex/latex/fmtcount/fc-french.def index f3a10c8fd81..eed31b8a63a 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fc-french.def +++ b/Master/texmf-dist/tex/latex/fmtcount/fc-french.def @@ -26,8 +26,28 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesFile{fc-french.def}[2005/04/29] -\newcommand{\@@unitstringfrench}[1]{% +\ProvidesFile{fc-french.def}[2007/04/20] +\newcommand*{\@ordinalMfrench}[2]{% +\iffmtord@abbrv + \edef#2{\number#1\relax\noexpand\fmtord{e}}% +\else + \ifnum#1=1\relax + \edef#2{\number#1\relax\noexpand\fmtord{er}}% + \else + \edef#2{\number#1\relax\noexpand\fmtord{eme}}% + \fi +\fi} +\newcommand*{\@ordinalFfrench}[2]{% +\iffmtord@abbrv + \edef#2{\number#1\relax\noexpand\fmtord{e}}% +\else + \ifnum#1=1\relax + \edef#2{\number#1\relax\noexpand\fmtord{ere}}% + \else + \edef#2{\number#1\relax\noexpand\fmtord{eme}}% + \fi +\fi} +\newcommand*{\@@unitstringfrench}[1]{% \ifcase#1\relax zero% \or un% @@ -41,15 +61,13 @@ zero% \or neuf% \fi } - -\newcommand{\@@unitstringFfrench}[1]{% +\newcommand*{\@@unitstringFfrench}[1]{% \ifnum#1=1\relax une% \else\@@unitstringfrench{#1}% \fi } - -\newcommand{\@@tenstringfrench}[1]{% +\newcommand*{\@@tenstringfrench}[1]{% \ifcase#1\relax \or dix% \or vingt% @@ -63,8 +81,7 @@ une% \or cent% \fi } - -\newcommand{\@@teenstringfrench}[1]{% +\newcommand*{\@@teenstringfrench}[1]{% \ifcase#1\relax dix% \or onze% @@ -78,8 +95,7 @@ dix% \or dix-neuf% \fi } - -\newcommand{\@@seventiesfrench}[1]{% +\newcommand*{\@@seventiesfrench}[1]{% \@tenstring{6}% \ifnum#1=1\relax \ \@andname\ @@ -88,8 +104,7 @@ dix% \fi \@teenstring{#1}% } - -\newcommand{\@@eightiesfrench}[1]{% +\newcommand*{\@@eightiesfrench}[1]{% \@unitstring{4}-\@tenstring{2}% \ifnum#1>0 -\@unitstring{#1}% @@ -97,33 +112,28 @@ dix% s% \fi } - -\newcommand{\@@ninetiesfrench}[1]{% +\newcommand*{\@@ninetiesfrench}[1]{% \@unitstring{4}-\@tenstring{2}-\@teenstring{#1}% } - -\newcommand{\@@seventiesfrenchswiss}[1]{% +\newcommand*{\@@seventiesfrenchswiss}[1]{% \@tenstring{7}% \ifnum#1=1\ \@andname\ \fi \ifnum#1>1-\fi \ifnum#1>0\@unitstring{#1}\fi } - -\newcommand{\@@eightiesfrenchswiss}[1]{% +\newcommand*{\@@eightiesfrenchswiss}[1]{% \@tenstring{8}% \ifnum#1=1\ \@andname\ \fi \ifnum#1>1-\fi \ifnum#1>0\@unitstring{#1}\fi } - -\newcommand{\@@ninetiesfrenchswiss}[1]{% +\newcommand*{\@@ninetiesfrenchswiss}[1]{% \@tenstring{9}% \ifnum#1=1\ \@andname\ \fi \ifnum#1>1-\fi \ifnum#1>0\@unitstring{#1}\fi } - -\newcommand{\@@Unitstringfrench}[1]{% +\newcommand*{\@@Unitstringfrench}[1]{% \ifcase#1\relax Zero% \or Un% @@ -137,15 +147,13 @@ Zero% \or Neuf% \fi } - -\newcommand{\@@UnitstringFfrench}[1]{% +\newcommand*{\@@UnitstringFfrench}[1]{% \ifnum#1=1\relax Une% \else \@@Unitstringfrench{#1}% \fi } - -\newcommand{\@@Tenstringfrench}[1]{% +\newcommand*{\@@Tenstringfrench}[1]{% \ifcase#1\relax \or Dix% \or Vingt% @@ -159,8 +167,7 @@ Une% \or Cent% \fi } - -\newcommand{\@@Teenstringfrench}[1]{% +\newcommand*{\@@Teenstringfrench}[1]{% \ifcase#1\relax Dix% \or Onze% @@ -174,8 +181,7 @@ Dix% \or Dix-Neuf% \fi } - -\newcommand{\@numberstringMfrenchswiss}[1]{% +\DeclareRobustCommand{\@numberstringMfrenchswiss}[2]{% \let\@unitstring=\@@unitstringfrench \let\@teenstring=\@@teenstringfrench \let\@tenstring=\@@tenstringfrench @@ -184,9 +190,8 @@ Dix% \let\@nineties=\@@ninetiesfrenchswiss \def\@hundred{cent}\def\@thousand{mille}% \def\@andname{et}% -\@@numberstringfrench{#1}} - -\newcommand{\@numberstringMfrenchfrance}[1]{% +\@@numberstringfrench{#1}{#2}} +\DeclareRobustCommand{\@numberstringMfrenchfrance}[2]{% \let\@unitstring=\@@unitstringfrench \let\@teenstring=\@@teenstringfrench \let\@tenstring=\@@tenstringfrench @@ -195,9 +200,8 @@ Dix% \let\@nineties=\@@ninetiesfrench \def\@hundred{cent}\def\@thousand{mille}% \def\@andname{et}% -\@@numberstringfrench{#1}} - -\newcommand{\@numberstringMfrenchbelgian}[1]{% +\@@numberstringfrench{#1}{#2}} +\DeclareRobustCommand{\@numberstringMfrenchbelgian}[2]{% \let\@unitstring=\@@unitstringfrench \let\@teenstring=\@@teenstringfrench \let\@tenstring=\@@tenstringfrench @@ -206,11 +210,9 @@ Dix% \let\@nineties=\@@ninetiesfrench \def\@hundred{cent}\def\@thousand{mille}% \def\@andname{et}% -\@@numberstringfrench{#1}} - +\@@numberstringfrench{#1}{#2}} \let\@numberstringMfrench=\@numberstringMfrenchfrance - -\newcommand{\@numberstringFfrenchswiss}[1]{% +\DeclareRobustCommand{\@numberstringFfrenchswiss}[2]{% \let\@unitstring=\@@unitstringFfrench \let\@teenstring=\@@teenstringfrench \let\@tenstring=\@@tenstringfrench @@ -219,9 +221,8 @@ Dix% \let\@nineties=\@@ninetiesfrenchswiss \def\@hundred{cent}\def\@thousand{mille}% \def\@andname{et}% -\@@numberstringfrench{#1}} - -\newcommand{\@numberstringFfrenchfrance}[1]{% +\@@numberstringfrench{#1}{#2}} +\DeclareRobustCommand{\@numberstringFfrenchfrance}[2]{% \let\@unitstring=\@@unitstringFfrench \let\@teenstring=\@@teenstringfrench \let\@tenstring=\@@tenstringfrench @@ -230,9 +231,8 @@ Dix% \let\@nineties=\@@ninetiesfrench \def\@hundred{cent}\def\@thousand{mille}% \def\@andname{et}% -\@@numberstringfrench{#1}} - -\newcommand{\@numberstringFfrenchbelgian}[1]{% +\@@numberstringfrench{#1}{#2}} +\DeclareRobustCommand{\@numberstringFfrenchbelgian}[2]{% \let\@unitstring=\@@unitstringFfrench \let\@teenstring=\@@teenstringfrench \let\@tenstring=\@@tenstringfrench @@ -241,11 +241,9 @@ Dix% \let\@nineties=\@@ninetiesfrench \def\@hundred{cent}\def\@thousand{mille}% \def\@andname{et}% -\@@numberstringfrench{#1}} - +\@@numberstringfrench{#1}{#2}} \let\@numberstringFfrench=\@numberstringFfrenchfrance - -\newcommand{\@NumberstringMfrenchswiss}[1]{% +\DeclareRobustCommand{\@NumberstringMfrenchswiss}[2]{% \let\@unitstring=\@@Unitstringfrench \let\@teenstring=\@@Teenstringfrench \let\@tenstring=\@@Tenstringfrench @@ -254,9 +252,8 @@ Dix% \let\@nineties=\@@ninetiesfrenchswiss \def\@hundred{Cent}\def\@thousand{Mille}% \def\@andname{et}% -\@@numberstringfrench{#1}} - -\newcommand{\@NumberstringMfrenchfrance}[1]{% +\@@numberstringfrench{#1}{#2}} +\DeclareRobustCommand{\@NumberstringMfrenchfrance}[2]{% \let\@unitstring=\@@Unitstringfrench \let\@teenstring=\@@Teenstringfrench \let\@tenstring=\@@Tenstringfrench @@ -265,9 +262,8 @@ Dix% \let\@nineties=\@@ninetiesfrench \def\@hundred{Cent}\def\@thousand{Mille}% \def\@andname{et}% -\@@numberstringfrench{#1}} - -\newcommand{\@NumberstringMfrenchbelgian}[1]{% +\@@numberstringfrench{#1}{#2}} +\DeclareRobustCommand{\@NumberstringMfrenchbelgian}[2]{% \let\@unitstring=\@@Unitstringfrench \let\@teenstring=\@@Teenstringfrench \let\@tenstring=\@@Tenstringfrench @@ -276,11 +272,9 @@ Dix% \let\@nineties=\@@ninetiesfrench \def\@hundred{Cent}\def\@thousand{Mille}% \def\@andname{et}% -\@@numberstringfrench{#1}} - +\@@numberstringfrench{#1}{#2}} \let\@NumberstringMfrench=\@NumberstringMfrenchfrance - -\newcommand{\@NumberstringFfrenchswiss}[1]{% +\DeclareRobustCommand{\@NumberstringFfrenchswiss}[2]{% \let\@unitstring=\@@UnitstringFfrench \let\@teenstring=\@@Teenstringfrench \let\@tenstring=\@@Tenstringfrench @@ -289,9 +283,8 @@ Dix% \let\@nineties=\@@ninetiesfrenchswiss \def\@hundred{Cent}\def\@thousand{Mille}% \def\@andname{et}% -\@@numberstringfrench{#1}} - -\newcommand{\@NumberstringFfrenchfrance}[1]{% +\@@numberstringfrench{#1}{#2}} +\DeclareRobustCommand{\@NumberstringFfrenchfrance}[2]{% \let\@unitstring=\@@UnitstringFfrench \let\@teenstring=\@@Teenstringfrench \let\@tenstring=\@@Tenstringfrench @@ -300,9 +293,8 @@ Dix% \let\@nineties=\@@ninetiesfrench \def\@hundred{Cent}\def\@thousand{Mille}% \def\@andname{et}% -\@@numberstringfrench{#1}} - -\newcommand{\@NumberstringFfrenchbelgian}[1]{% +\@@numberstringfrench{#1}{#2}} +\DeclareRobustCommand{\@NumberstringFfrenchbelgian}[2]{% \let\@unitstring=\@@UnitstringFfrench \let\@teenstring=\@@Teenstringfrench \let\@tenstring=\@@Tenstringfrench @@ -311,13 +303,11 @@ Dix% \let\@nineties=\@@ninetiesfrench \def\@hundred{Cent}\def\@thousand{Mille}% \def\@andname{et}% -\@@numberstringfrench{#1}} - +\@@numberstringfrench{#1}{#2}} \let\@NumberstringFfrench=\@NumberstringFfrenchfrance - -\newcommand{\@ordinalstringMfrenchswiss}[1]{% +\DeclareRobustCommand{\@ordinalstringMfrenchswiss}[2]{% \ifnum#1=1\relax -premier% +\def#2{premier}% \else \let\@unitthstring=\@@unitthstringfrench \let\@unitstring=\@@unitstringfrench @@ -334,12 +324,11 @@ premier% \def\@hundredth{centi\`eme}\def\@hundred{cent}% \def\@thousandth{mili\`eme}\def\@thousand{mille}% \def\@andname{et}% -\@@ordinalstringfrench{#1}% +\@@ordinalstringfrench{#1}{#2}% \fi} - -\newcommand{\@ordinalstringMfrenchfrance}[1]{% +\DeclareRobustCommand{\@ordinalstringMfrenchfrance}[2]{% \ifnum#1=1\relax -premier% +\def#2{premier}% \else \let\@unitthstring=\@@unitthstringfrench \let\@unitstring=\@@unitstringfrench @@ -357,12 +346,11 @@ premier% \def\@hundredth{centi\`eme}\def\@hundred{cent}% \def\@thousandth{mili\`eme}\def\@thousand{mille}% \def\@andname{et}% -\@@ordinalstringfrench{#1}% +\@@ordinalstringfrench{#1}{#2}% \fi} - -\newcommand{\@ordinalstringMfrenchbelgian}[1]{% +\DeclareRobustCommand{\@ordinalstringMfrenchbelgian}[2]{% \ifnum#1=1\relax -premier% +\def#2{premier}% \else \let\@unitthstring=\@@unitthstringfrench \let\@unitstring=\@@unitstringfrench @@ -380,14 +368,12 @@ premier% \def\@hundredth{centi\`eme}\def\@hundred{cent}% \def\@thousandth{mili\`eme}\def\@thousand{mille}% \def\@andname{et}% -\@@ordinalstringfrench{#1}% +\@@ordinalstringfrench{#1}{#2}% \fi} - \let\@ordinalstringMfrench=\@ordinalstringMfrenchfrance - -\newcommand{\@ordinalstringFfrenchswiss}[1]{% +\DeclareRobustCommand{\@ordinalstringFfrenchswiss}[2]{% \ifnum#1=1\relax -premi\`ere% +\def#2{premi\`ere}% \else \let\@unitthstring=\@@unitthstringfrench \let\@unitstring=\@@unitstringFfrench @@ -404,12 +390,11 @@ premi\`ere% \def\@hundredth{centi\`eme}\def\@hundred{cent}% \def\@thousandth{mili\`eme}\def\@thousand{mille}% \def\@andname{et}% -\@@ordinalstringfrench{#1}% +\@@ordinalstringfrench{#1}{#2}% \fi} - -\newcommand{\@ordinalstringFfrenchfrance}[1]{% +\DeclareRobustCommand{\@ordinalstringFfrenchfrance}[2]{% \ifnum#1=1\relax -premi\`ere% +\def#2{premi\`ere}% \else \let\@unitthstring=\@@unitthstringfrench \let\@unitstring=\@@unitstringFfrench @@ -427,12 +412,11 @@ premi\`ere% \def\@hundredth{centi\`eme}\def\@hundred{cent}% \def\@thousandth{mili\`eme}\def\@thousand{mille}% \def\@andname{et}% -\@@ordinalstringfrench{#1}% +\@@ordinalstringfrench{#1}{#2}% \fi} - -\newcommand{\@ordinalstringFfrenchbelgian}[1]{% +\DeclareRobustCommand{\@ordinalstringFfrenchbelgian}[2]{% \ifnum#1=1\relax -premi\`ere% +\def#2{premi\`ere}% \else \let\@unitthstring=\@@unitthstringfrench \let\@unitstring=\@@unitstringFfrench @@ -450,14 +434,12 @@ premi\`ere% \def\@hundredth{centi\`eme}\def\@hundred{cent}% \def\@thousandth{mili\`eme}\def\@thousand{mille}% \def\@andname{et}% -\@@ordinalstringfrench{#1}% +\@@ordinalstringfrench{#1}{#2}% \fi} - \let\@ordinalstringFfrench=\@ordinalstringFfrenchfrance - -\newcommand{\@OrdinalstringMfrenchswiss}[1]{% +\DeclareRobustCommand{\@OrdinalstringMfrenchswiss}[2]{% \ifnum#1=1\relax -Premi\`ere% +\def#2{Premi\`ere}% \else \let\@unitthstring=\@@Unitthstringfrench \let\@unitstring=\@@Unitstringfrench @@ -474,12 +456,11 @@ Premi\`ere% \def\@hundredth{Centi\`eme}\def\@hundred{Cent}% \def\@thousandth{Mili\`eme}\def\@thousand{Mille}% \def\@andname{et}% -\@@ordinalstringfrench{#1}% +\@@ordinalstringfrench{#1}{#2}% \fi} - -\newcommand{\@OrdinalstringMfrenchfrance}[1]{% +\DeclareRobustCommand{\@OrdinalstringMfrenchfrance}[2]{% \ifnum#1=1\relax -Premi\`ere% +\def#2{Premi\`ere}% \else \let\@unitthstring=\@@Unitthstringfrench \let\@unitstring=\@@Unitstringfrench @@ -497,12 +478,11 @@ Premi\`ere% \def\@hundredth{Centi\`eme}\def\@hundred{Cent}% \def\@thousandth{Mili\`eme}\def\@thousand{Mille}% \def\@andname{et}% -\@@ordinalstringfrench{#1}% +\@@ordinalstringfrench{#1}{#2}% \fi} - -\newcommand{\@OrdinalstringMfrenchbelgian}[1]{% +\DeclareRobustCommand{\@OrdinalstringMfrenchbelgian}[2]{% \ifnum#1=1\relax -Premi\`ere% +\def#2{Premi\`ere}% \else \let\@unitthstring=\@@Unitthstringfrench \let\@unitstring=\@@Unitstringfrench @@ -520,14 +500,12 @@ Premi\`ere% \def\@hundredth{Centi\`eme}\def\@hundred{Cent}% \def\@thousandth{Mili\`eme}\def\@thousand{Mille}% \def\@andname{et}% -\@@ordinalstringfrench{#1}% +\@@ordinalstringfrench{#1}{#2}% \fi} - \let\@OrdinalstringMfrench=\@OrdinalstringMfrenchfrance - -\newcommand{\@OrdinalstringFfrenchswiss}[1]{% +\DeclareRobustCommand{\@OrdinalstringFfrenchswiss}[2]{% \ifnum#1=1\relax -Premi\`ere% +\def#2{Premi\`ere}% \else \let\@unitthstring=\@@Unitthstringfrench \let\@unitstring=\@@UnitstringFfrench @@ -544,12 +522,11 @@ Premi\`ere% \def\@hundredth{Centi\`eme}\def\@hundred{Cent}% \def\@thousandth{Mili\`eme}\def\@thousand{Mille}% \def\@andname{et}% -\@@ordinalstringfrench{#1}% +\@@ordinalstringfrench{#1}{#2}% \fi} - -\newcommand{\@OrdinalstringFfrenchfrance}[1]{% +\DeclareRobustCommand{\@OrdinalstringFfrenchfrance}[2]{% \ifnum#1=1\relax -Premi\`ere% +\def#2{Premi\`ere}% \else \let\@unitthstring=\@@Unitthstringfrench \let\@unitstring=\@@UnitstringFfrench @@ -567,12 +544,11 @@ Premi\`ere% \def\@hundredth{Centi\`eme}\def\@hundred{Cent}% \def\@thousandth{Mili\`eme}\def\@thousand{Mille}% \def\@andname{et}% -\@@ordinalstringfrench{#1}% +\@@ordinalstringfrench{#1}{#2}% \fi} - -\newcommand{\@OrdinalstringFfrenchbelgian}[1]{% +\DeclareRobustCommand{\@OrdinalstringFfrenchbelgian}[2]{% \ifnum#1=1\relax -Premi\`ere% +\def#2{Premi\`ere}% \else \let\@unitthstring=\@@Unitthstringfrench \let\@unitstring=\@@UnitstringFfrench @@ -590,26 +566,10 @@ Premi\`ere% \def\@hundredth{Centi\`eme}\def\@hundred{Cent}% \def\@thousandth{Mili\`eme}\def\@thousand{Mille}% \def\@andname{et}% -\@@ordinalstringfrench{#1}% +\@@ordinalstringfrench{#1}{#2}% \fi} - \let\@OrdinalstringFfrench=\@OrdinalstringFfrenchfrance - -\newcommand{\@ordinalMfrench}[1]{% -\iffmtord@abbrv -#1\fmtord{e}% -\else -#1\ifnum#1=1\fmtord{er}\else\fmtord{eme}\fi -\fi} - -\newcommand{\@ordinalFfrench}[1]{% -\iffmtord@abbrv -#1\fmtord{e}% -\else -#1\ifnum#1=1\fmtord{ere}\else\fmtord{eme}\fi -\fi} - -\newcommand{\@@unitthstringfrench}[1]{% +\newcommand*{\@@unitthstringfrench}[1]{% \ifcase#1\relax zero% \or uni\`eme% @@ -623,8 +583,7 @@ zero% \or neuvi\`eme% \fi } - -\newcommand{\@@tenthstringfrench}[1]{% +\newcommand*{\@@tenthstringfrench}[1]{% \ifcase#1\relax \or dixi\`eme% \or vingti\`eme% @@ -637,8 +596,7 @@ zero% \or nonenti\`eme% \fi } - -\newcommand{\@@teenthstringfrench}[1]{% +\newcommand*{\@@teenthstringfrench}[1]{% \ifcase#1\relax dixi\`eme% \or onzi\`eme% @@ -652,8 +610,7 @@ dixi\`eme% \or dix-neuvi\`eme% \fi } - -\newcommand{\@@seventiethsfrenchswiss}[1]{% +\newcommand*{\@@seventiethsfrenchswiss}[1]{% \ifcase#1\relax \@tenthstring{7}% \or @@ -661,8 +618,7 @@ dixi\`eme% \else \@tenstring{7}-\@unitthstring{#1}% \fi} - -\newcommand{\@@eightiethsfrenchswiss}[1]{% +\newcommand*{\@@eightiethsfrenchswiss}[1]{% \ifcase#1\relax \@tenthstring{8}% \or @@ -670,8 +626,7 @@ dixi\`eme% \else \@tenstring{8}-\@unitthstring{#1}% \fi} - -\newcommand{\@@ninetiethsfrenchswiss}[1]{% +\newcommand*{\@@ninetiethsfrenchswiss}[1]{% \ifcase#1\relax \@tenthstring{9}% \or @@ -679,8 +634,7 @@ dixi\`eme% \else \@tenstring{9}-\@unitthstring{#1}% \fi} - -\newcommand{\@@seventiethsfrench}[1]{% +\newcommand*{\@@seventiethsfrench}[1]{% \ifnum#1=0\relax \@tenstring{6}% -% @@ -690,8 +644,7 @@ dixi\`eme% \fi \@teenthstring{#1}% } - -\newcommand{\@@eightiethsfrench}[1]{% +\newcommand*{\@@eightiethsfrench}[1]{% \ifnum#1>0\relax \@unitstring{4}-\@tenstring{2}% -\@unitthstring{#1}% @@ -699,12 +652,10 @@ dixi\`eme% \@unitstring{4}-\@tenthstring{2}% \fi } - -\newcommand{\@@ninetiethsfrench}[1]{% +\newcommand*{\@@ninetiethsfrench}[1]{% \@unitstring{4}-\@tenstring{2}-\@teenthstring{#1}% } - -\newcommand{\@@Unitthstringfrench}[1]{% +\newcommand*{\@@Unitthstringfrench}[1]{% \ifcase#1\relax Zero% \or Uni\`eme% @@ -718,8 +669,7 @@ Zero% \or Neuvi\`eme% \fi } - -\newcommand{\@@Tenthstringfrench}[1]{% +\newcommand*{\@@Tenthstringfrench}[1]{% \ifcase#1\relax \or Dixi\`eme% \or Vingti\`eme% @@ -732,8 +682,7 @@ Zero% \or Nonenti\`eme% \fi } - -\newcommand{\@@Teenthstringfrench}[1]{% +\newcommand*{\@@Teenthstringfrench}[1]{% \ifcase#1\relax Dixi\`eme% \or Onzi\`eme% @@ -747,8 +696,7 @@ Dixi\`eme% \or Dix-Neuvi\`eme% \fi } - -\newcommand{\@@numberstringfrench}[1]{% +\newcommand*{\@@numberstringfrench}[2]{% \ifnum#1>99999 \PackageError{fmtcount}{Out of range}% {This macro only works for values less than 100000}% @@ -760,101 +708,142 @@ you can try typing "minus" first, and then pass the modulus of this number}% \fi \fi +\def#2{}% \@strctr=#1\relax \divide\@strctr by 1000\relax -\ifnum\@strctr>9 +\ifnum\@strctr>9\relax \@tmpstrctr=\@strctr - \divide\@strctr by 10 - \ifnum\@strctr>1 + \divide\@strctr by 10\relax + \ifnum\@strctr>1\relax \ifthenelse{\(\@strctr>6\)\and\(\@strctr<10\)}{% \@modulo{\@tmpstrctr}{10}% \ifnum\@strctr<8\relax - \@seventies{\@tmpstrctr}% + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@seventies{\@tmpstrctr}}% \else \ifnum\@strctr<9\relax - \@eighties{\@tmpstrctr}% + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@eighties{\@tmpstrctr}}% \else - \ifnum\@strctr<10\@nineties{\@tmpstrctr}\fi + \ifnum\@strctr<10\relax + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@nineties{\@tmpstrctr}}% + \fi \fi \fi }{% - \@tenstring{\@strctr}% + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@tenstring{\@strctr}}% \@strctr=#1\relax \divide\@strctr by 1000\relax \@modulo{\@strctr}{10}% \ifnum\@strctr>0\relax - \ \@unitstring{\@strctr}% + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\ \@unitstring{\@strctr}}% \fi }% \else \@strctr=#1\relax \divide\@strctr by 1000 \@modulo{\@strctr}{10}% - \@teenstring{\@strctr}% + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@teenstring{\@strctr}}% \fi - \ \@thousand% + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\ \@thousand}% \else - \ifnum\@strctr>0 - \ifnum\@strctr>1\@unitstring{\@strctr}\ \fi - \@thousand + \ifnum\@strctr>0\relax + \ifnum\@strctr>1\relax + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@unitstring{\@strctr}\ }% + \fi + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@thousand}% \fi \fi \@strctr=#1\relax \@modulo{\@strctr}{1000}% \divide\@strctr by 100 \ifnum\@strctr>0\relax - \ifnum#1>1000 \ \fi + \ifnum#1>1000\relax + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\ }% + \fi \@tmpstrctr=#1\relax \@modulo{\@tmpstrctr}{1000}\relax \ifnum\@tmpstrctr=100\relax - \@tenstring{10}\relax + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@tenstring{10}}% \else - \ifnum\@strctr>1\@unitstring{\@strctr}\ \fi - \@hundred + \ifnum\@strctr>1\relax + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@unitstring{\@strctr}\ }% + \fi + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@hundred}% \fi \fi \@strctr=#1\relax \@modulo{\@strctr}{100}% \ifnum#1>100\relax \ifnum\@strctr>0\relax -\ % \ \@andname\ + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\ }% \else - \ifnum\@tmpstrctr>0s\fi% + \ifnum\@tmpstrctr>0\relax + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr s}% + \fi% \fi \fi -\ifnum\@strctr>19 -\@tmpstrctr=\@strctr -\divide\@strctr by 10 -\ifthenelse{\@strctr>6}{% -\@modulo{\@tmpstrctr}{10}% -\ifnum\@strctr<8 -\@seventies{\@tmpstrctr}% -\else -\ifnum\@strctr<9 -\@eighties{\@tmpstrctr}% -\else -\@nineties{\@tmpstrctr}% -\fi -\fi -}{% -\@tenstring{\@strctr}% -\@strctr=#1\relax \@modulo{\@strctr}{10}% -\ifnum\@strctr>0\relax - \ifnum\@strctr=1\ \@andname\ \else-\fi - \@unitstring{\@strctr}% -\fi -}% -\else -\ifnum\@strctr<10 -\ifnum\@strctr=0 -\ifnum#1<100 \@unitstring{\@strctr}\fi -\else%(>0,<10) -\@unitstring{\@strctr}% -\fi -\else%>10 -\@modulo{\@strctr}{10}% -\@teenstring{\@strctr}% -\fi +\ifnum\@strctr>19\relax + \@tmpstrctr=\@strctr + \divide\@strctr by 10\relax + \ifthenelse{\@strctr>6}{% + \@modulo{\@tmpstrctr}{10}% + \ifnum\@strctr<8\relax + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@seventies{\@tmpstrctr}}% + \else + \ifnum\@strctr<9\relax + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@eighties{\@tmpstrctr}}% + \else + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@nineties{\@tmpstrctr}}% + \fi + \fi + }{% + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@tenstring{\@strctr}}% + \@strctr=#1\relax \@modulo{\@strctr}{10}% + \ifnum\@strctr>0\relax + \let\@@fc@numstr#2\relax + \ifnum\@strctr=1\relax + \edef#2{\@@fc@numstr\ \@andname\ }% + \else + \edef#2{\@@fc@numstr-}% + \fi + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@unitstring{\@strctr}}% + \fi + }% +\else + \ifnum\@strctr<10\relax + \ifnum\@strctr=0\relax + \ifnum#1<100\relax + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@unitstring{\@strctr}}% + \fi + \else%(>0,<10) + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@unitstring{\@strctr}}% + \fi + \else%>10 + \@modulo{\@strctr}{10}% + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@teenstring{\@strctr}}% + \fi \fi } -\newcommand{\@@ordinalstringfrench}[1]{% +\newcommand*{\@@ordinalstringfrench}[2]{% \ifnum#1>99999 \PackageError{fmtcount}{Out of range}% {This macro only works for values less than 100000}% @@ -866,6 +855,7 @@ you can try typing "minus" first, and then pass the modulus of this number}% \fi \fi +\def#2{}% \@strctr=#1\relax \divide\@strctr by 1000\relax \ifnum\@strctr>9 \@tmpstrctr=\@strctr @@ -874,85 +864,137 @@ this number}% \ifthenelse{\@strctr>6}{% \@modulo{\@tmpstrctr}{10}% \ifnum\@strctr=7\relax - \@seventies{\@tmpstrctr}% + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@seventies{\@tmpstrctr}}% \else \ifnum\@strctr=8\relax - \@eighties{\@tmpstrctr}% + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@eighties{\@tmpstrctr}}% \else - \@nineties{\@tmpstrctr}% + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@nineties{\@tmpstrctr}}% \fi \fi }{% - \@tenstring{\@strctr}% + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@tenstring{\@strctr}}% \@strctr=#1\relax \divide\@strctr by 1000\relax \@modulo{\@strctr}{10}% - \ifnum\@strctr=1\ \@andname\fi - \ifnum\@strctr>0\ \@unitstring{\@strctr}\fi + \ifnum\@strctr=1\relax + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\ \@andname}% + \fi + \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}% - \@teenstring{\@strctr}% + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@teenstring{\@strctr}}% \fi \@strctr=#1\relax \@modulo{\@strctr}{1000}% - \ifnum\@strctr=0\ \@thousandth\else\ \@thousand \fi + \ifnum\@strctr=0\relax + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\ \@thousandth}% + \else + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\ \@thousand}% + \fi \else \ifnum\@strctr>0\relax - \@unitstring{\@strctr}% + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@unitstring{\@strctr}}% \@strctr=#1\relax \@modulo{\@strctr}{1000}% - \ifnum\@strctr=0\ \@thousandth\else\ \@thousand\fi + \ifnum\@strctr=0\relax + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\ \@thousandth}% + \else + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\ \@thousand}% + \fi \fi \fi \@strctr=#1\relax \@modulo{\@strctr}{1000}% -\divide\@strctr by 100 -\ifnum\@strctr>0 -\ifnum#1>1000 \ \fi\@unitstring{\@strctr}% -\@strctr=#1\relax \@modulo{\@strctr}{100}% -\ifnum\@strctr=0\ \@hundredth\else\ \@hundred\fi +\divide\@strctr by 100\relax +\ifnum\@strctr>0\relax + \ifnum#1>1000\relax + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\ }% + \fi + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@unitstring{\@strctr}}% + \@strctr=#1\relax \@modulo{\@strctr}{100}% + \let\@@fc@ordstr#2\relax + \ifnum\@strctr=0\relax + \edef#2{\@@fc@ordstr\ \@hundredth}% + \else + \edef#2{\@@fc@ordstr\ \@hundred}% + \fi \fi \@tmpstrctr=\@strctr \@strctr=#1\relax \@modulo{\@strctr}{100}% \ifnum#1>100\relax -\ifnum\@strctr>0\ \@andname\ \fi\fi -\ifnum\@strctr>19 -\@tmpstrctr=\@strctr -\divide\@strctr by 10 -\@modulo{\@tmpstrctr}{10}% -\ifthenelse{\@strctr>6}{% -\ifnum\@strctr=7\relax -\@seventieths{\@tmpstrctr}% -\else -\ifnum\@strctr=8\relax -\@eightieths{\@tmpstrctr}% -\else -\@ninetieths{\@tmpstrctr}% -\fi -\fi -}{% -\ifnum\@tmpstrctr=0\relax - \@tenthstring{\@strctr}% -\else - \@tenstring{\@strctr}% -\fi -\@strctr=#1\relax \@modulo{\@strctr}{10}% -\ifnum\@strctr=1\ \@andname\fi -\ifnum\@strctr>0 -\ \@unitthstring{\@strctr}% -\fi -}% -\else -\ifnum\@strctr<10 -\ifnum\@strctr=0 -\ifnum#1<100 \@unitthstring{\@strctr}\fi -\else -\@unitthstring{\@strctr}% -\fi -\else -\@modulo{\@strctr}{10}% -\@teenthstring{\@strctr}% + \ifnum\@strctr>0\relax + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\ \@andname\ }% + \fi \fi +\ifnum\@strctr>19\relax + \@tmpstrctr=\@strctr + \divide\@strctr by 10\relax + \@modulo{\@tmpstrctr}{10}% + \ifthenelse{\@strctr>6}{% + \ifnum\@strctr=7\relax + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@seventieths{\@tmpstrctr}}% + \else + \ifnum\@strctr=8\relax + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@eightieths{\@tmpstrctr}}% + \else + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@ninetieths{\@tmpstrctr}}% + \fi + \fi + }{% + \ifnum\@tmpstrctr=0\relax + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@tenthstring{\@strctr}}% + \else + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@tenstring{\@strctr}}% + \fi + \@strctr=#1\relax \@modulo{\@strctr}{10}% + \ifnum\@strctr=1\relax + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\ \@andname}% + \fi + \ifnum\@strctr>0\relax + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\ \@unitthstring{\@strctr}}% + \fi + }% +\else + \ifnum\@strctr<10\relax + \ifnum\@strctr=0\relax + \ifnum#1<100\relax + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@unitthstring{\@strctr}}% + \fi + \else + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@unitthstring{\@strctr}}% + \fi + \else + \@modulo{\@strctr}{10}% + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@teenthstring{\@strctr}}% + \fi \fi } \endinput |