diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/fmtcount/fc-spanish.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/fmtcount/fc-spanish.def | 266 |
1 files changed, 143 insertions, 123 deletions
diff --git a/Master/texmf-dist/tex/latex/fmtcount/fc-spanish.def b/Master/texmf-dist/tex/latex/fmtcount/fc-spanish.def index b0315393ae2..04ac0992327 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fc-spanish.def +++ b/Master/texmf-dist/tex/latex/fmtcount/fc-spanish.def @@ -26,7 +26,11 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesFile{fc-spanish.def}[2005/04/29] +\ProvidesFile{fc-spanish.def}[2007/04/20] +\newcommand{\@ordinalMspanish}[2]{% +\edef#2{\number#1\relax\noexpand\fmtord{o}}} +\newcommand{\@ordinalFspanish}[2]{% +\edef#2{\number#1\relax\noexpand\fmtord{a}}} \newcommand{\@@unitstringspanish}[1]{% \ifcase#1\relax cero% @@ -41,7 +45,6 @@ cero% \or nueve% \fi } - \newcommand{\@@unitstringFspanish}[1]{% \ifcase#1\relax cera% @@ -56,7 +59,6 @@ cera% \or nueve% \fi } - \newcommand{\@@tenstringspanish}[1]{% \ifcase#1\relax \or diez% @@ -71,7 +73,6 @@ cera% \or cien% \fi } - \newcommand{\@@teenstringspanish}[1]{% \ifcase#1\relax diez% @@ -86,7 +87,6 @@ diez% \or diecinueve% \fi } - \newcommand{\@@twentystringspanish}[1]{% \ifcase#1\relax veinte% @@ -100,7 +100,6 @@ veinte% \or veintiocho% \or veintinueve% \fi} - \newcommand{\@@twentystringFspanish}[1]{% \ifcase#1\relax veinte% @@ -114,7 +113,6 @@ veinte% \or veintiocho% \or veintinueve% \fi} - \newcommand{\@@hundredstringspanish}[1]{% \ifcase#1\relax \or ciento% @@ -127,7 +125,6 @@ veinte% \or ochocientos% \or novecientos% \fi} - \newcommand{\@@hundredstringFspanish}[1]{% \ifcase#1\relax \or cienta% @@ -140,7 +137,6 @@ veinte% \or ochocientas% \or novecientas% \fi} - \newcommand{\@@Unitstringspanish}[1]{% \ifcase#1\relax Cero% @@ -155,7 +151,6 @@ Cero% \or Nueve% \fi } - \newcommand{\@@UnitstringFspanish}[1]{% \ifcase#1\relax Cera% @@ -170,7 +165,6 @@ Cera% \or Nueve% \fi } - \newcommand{\@@Tenstringspanish}[1]{% \ifcase#1\relax \or Diez% @@ -185,7 +179,6 @@ Cera% \or Cien% \fi } - \newcommand{\@@Teenstringspanish}[1]{% \ifcase#1\relax Diez% @@ -200,7 +193,6 @@ Diez% \or Diecinueve% \fi } - \newcommand{\@@Twentystringspanish}[1]{% \ifcase#1\relax Veinte% @@ -214,7 +206,6 @@ Veinte% \or Veintiocho% \or Veintinueve% \fi} - \newcommand{\@@TwentystringFspanish}[1]{% \ifcase#1\relax Veinte% @@ -228,7 +219,6 @@ Veinte% \or Veintiocho% \or Veintinueve% \fi} - \newcommand{\@@Hundredstringspanish}[1]{% \ifcase#1\relax \or Ciento% @@ -241,7 +231,6 @@ Veinte% \or Ochocientos% \or Novecientos% \fi} - \newcommand{\@@HundredstringFspanish}[1]{% \ifcase#1\relax \or Cienta% @@ -254,8 +243,7 @@ Veinte% \or Ochocientas% \or Novecientas% \fi} - -\newcommand{\@numberstringMspanish}[1]{% +\DeclareRobustCommand{\@numberstringMspanish}[2]{% \let\@unitstring=\@@unitstringspanish \let\@teenstring=\@@teenstringspanish \let\@tenstring=\@@tenstringspanish @@ -263,9 +251,8 @@ Veinte% \let\@hundredstring=\@@hundredstringspanish \def\@hundred{cien}\def\@thousand{mil}% \def\@andname{y}% -\@@numberstringspanish{#1}} - -\newcommand{\@numberstringFspanish}[1]{% +\@@numberstringspanish{#1}{#2}} +\DeclareRobustCommand{\@numberstringFspanish}[2]{% \let\@unitstring=\@@unitstringFspanish \let\@teenstring=\@@teenstringspanish \let\@tenstring=\@@tenstringspanish @@ -273,9 +260,8 @@ Veinte% \let\@hundredstring=\@@hundredstringFspanish \def\@hundred{cien}\def\@thousand{mil}% \def\@andname{y}% -\@@numberstringspanish{#1}} - -\newcommand{\@NumberstringMspanish}[1]{% +\@@numberstringspanish{#1}{#2}} +\DeclareRobustCommand{\@NumberstringMspanish}[2]{% \let\@unitstring=\@@Unitstringspanish \let\@teenstring=\@@Teenstringspanish \let\@tenstring=\@@Tenstringspanish @@ -283,9 +269,8 @@ Veinte% \let\@hundredstring=\@@Hundredstringspanish \def\@andname{y}% \def\@hundred{Cien}\def\@thousand{Mil}% -\@@numberstringspanish{#1}} - -\newcommand{\@NumberstringFspanish}[1]{% +\@@numberstringspanish{#1}{#2}} +\DeclareRobustCommand{\@NumberstringFspanish}[2]{% \let\@unitstring=\@@UnitstringFspanish \let\@teenstring=\@@Teenstringspanish \let\@tenstring=\@@Tenstringspanish @@ -293,47 +278,39 @@ Veinte% \let\@hundredstring=\@@HundredstringFspanish \def\@andname{y}% \def\@hundred{Cien}\def\@thousand{Mil}% -\@@numberstringspanish{#1}} - -\newcommand{\@ordinalstringMspanish}[1]{% +\@@numberstringspanish{#1}{#2}} +\DeclareRobustCommand{\@ordinalstringMspanish}[2]{% \let\@unitthstring=\@@unitthstringspanish \let\@unitstring=\@@unitstringspanish \let\@teenthstring=\@@teenthstringspanish \let\@tenthstring=\@@tenthstringspanish \let\@hundredthstring=\@@hundredthstringspanish \def\@thousandth{mil\'esimo}% -\@@ordinalstringspanish{#1}} - -\newcommand{\@ordinalstringFspanish}[1]{% +\@@ordinalstringspanish{#1}{#2}} +\DeclareRobustCommand{\@ordinalstringFspanish}[2]{% \let\@unitthstring=\@@unitthstringFspanish \let\@unitstring=\@@unitstringFspanish \let\@teenthstring=\@@teenthstringFspanish \let\@tenthstring=\@@tenthstringFspanish \let\@hundredthstring=\@@hundredthstringFspanish \def\@thousandth{mil\'esima}% -\@@ordinalstringspanish{#1}} - -\newcommand{\@OrdinalstringMspanish}[1]{% +\@@ordinalstringspanish{#1}{#2}} +\DeclareRobustCommand{\@OrdinalstringMspanish}[2]{% \let\@unitthstring=\@@Unitthstringspanish \let\@unitstring=\@@Unitstringspanish \let\@teenthstring=\@@Teenthstringspanish \let\@tenthstring=\@@Tenthstringspanish \let\@hundredthstring=\@@Hundredthstringspanish \def\@thousandth{Mil\'esimo}% -\@@ordinalstringspanish{#1}} - -\newcommand{\@OrdinalstringFspanish}[1]{% +\@@ordinalstringspanish{#1}{#2}} +\DeclareRobustCommand{\@OrdinalstringFspanish}[2]{% \let\@unitthstring=\@@UnitthstringFspanish \let\@unitstring=\@@UnitstringFspanish \let\@teenthstring=\@@TeenthstringFspanish \let\@tenthstring=\@@TenthstringFspanish \let\@hundredthstring=\@@HundredthstringFspanish \def\@thousandth{Mil\'esima}% -\@@ordinalstringspanish{#1}} - -\newcommand{\@ordinalMspanish}[1]{#1\fmtord{o}} -\newcommand{\@ordinalFspanish}[1]{#1\fmtord{a}} - +\@@ordinalstringspanish{#1}{#2}} \newcommand{\@@unitthstringspanish}[1]{% \ifcase#1\relax cero% @@ -348,7 +325,6 @@ cero% \or noveno% \fi } - \newcommand{\@@tenthstringspanish}[1]{% \ifcase#1\relax \or d\'ecimo% @@ -362,7 +338,6 @@ cero% \or nonag\'esimo% \fi } - \newcommand{\@@teenthstringspanish}[1]{% \ifcase#1\relax d\'ecimo% @@ -377,7 +352,6 @@ d\'ecimo% \or decimonoveno% \fi } - \newcommand{\@@hundredthstringspanish}[1]{% \ifcase#1\relax \or cent\'esimo% @@ -390,7 +364,6 @@ d\'ecimo% \or octingent\'esimo% \or noningent\'esimo% \fi} - \newcommand{\@@unitthstringFspanish}[1]{% \ifcase#1\relax cera% @@ -405,7 +378,6 @@ cera% \or novena% \fi } - \newcommand{\@@tenthstringFspanish}[1]{% \ifcase#1\relax \or d\'ecima% @@ -419,7 +391,6 @@ cera% \or nonag\'esima% \fi } - \newcommand{\@@teenthstringFspanish}[1]{% \ifcase#1\relax d\'ecima% @@ -434,7 +405,6 @@ d\'ecima% \or decimonovena% \fi } - \newcommand{\@@hundredthstringFspanish}[1]{% \ifcase#1\relax \or cent\'esima% @@ -447,7 +417,6 @@ d\'ecima% \or octingent\'esima% \or noningent\'esima% \fi} - \newcommand{\@@Unitthstringspanish}[1]{% \ifcase#1\relax Cero% @@ -462,7 +431,6 @@ Cero% \or Noveno% \fi } - \newcommand{\@@Tenthstringspanish}[1]{% \ifcase#1\relax \or D\'ecimo% @@ -476,7 +444,6 @@ Cero% \or Nonag\'esimo% \fi } - \newcommand{\@@Teenthstringspanish}[1]{% \ifcase#1\relax D\'ecimo% @@ -491,7 +458,6 @@ D\'ecimo% \or Decimonoveno% \fi } - \newcommand{\@@Hundredthstringspanish}[1]{% \ifcase#1\relax \or Cent\'esimo% @@ -504,7 +470,6 @@ D\'ecimo% \or Octingent\'esimo% \or Noningent\'esimo% \fi} - \newcommand{\@@UnitthstringFspanish}[1]{% \ifcase#1\relax Cera% @@ -519,7 +484,6 @@ Cera% \or Novena% \fi } - \newcommand{\@@TenthstringFspanish}[1]{% \ifcase#1\relax \or D\'ecima% @@ -533,7 +497,6 @@ Cera% \or Nonag\'esima% \fi } - \newcommand{\@@TeenthstringFspanish}[1]{% \ifcase#1\relax D\'ecima% @@ -548,7 +511,6 @@ D\'ecima% \or Decimonovena% \fi } - \newcommand{\@@HundredthstringFspanish}[1]{% \ifcase#1\relax \or Cent\'esima% @@ -562,7 +524,7 @@ D\'ecima% \or Noningent\'esima% \fi} -\newcommand{\@@numberstringspanish}[1]{% +\newcommand{\@@numberstringspanish}[2]{% \ifnum#1>99999 \PackageError{fmtcount}{Out of range}% {This macro only works for values less than 100000}% @@ -574,64 +536,96 @@ 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 \divide\@strctr by 10 \ifnum\@strctr>1 - \@tenstring{\@strctr}% + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@tenstring{\@strctr}}% \@strctr=#1 \divide\@strctr by 1000\relax \@modulo{\@strctr}{10}% - \ifnum\@strctr>0\ \@andname\ \@unitstring{\@strctr}\fi + \ifnum\@strctr>0\relax + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\ \@andname\ \@unitstring{\@strctr}}% + \fi \else \@strctr=#1\relax \divide\@strctr by 1000\relax \@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 -\ifnum#1>1000\ \fi -\@tmpstrctr=#1\relax -\@modulo{\@tmpstrctr}{1000}% -\ifnum\@tmpstrctr=100\@tenstring{10}\else\@hundredstring{\@strctr}\fi% +\divide\@strctr by 100\relax +\ifnum\@strctr>0\relax + \ifnum#1>1000\relax + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\ }% + \fi + \@tmpstrctr=#1\relax + \@modulo{\@tmpstrctr}{1000}% + \ifnum\@tmpstrctr=100\relax + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@tenstring{10}}% + \else + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@hundredstring{\@strctr}}% + \fi \fi \@strctr=#1\relax \@modulo{\@strctr}{100}% -\ifnum#1>100 \ifnum\@strctr>0\ \@andname\ \fi\fi -\ifnum\@strctr>29 -\divide\@strctr by 10 -\@tenstring{\@strctr}% -\@strctr=#1\relax \@modulo{\@strctr}{10}% -\ifnum\@strctr>0 -\ \@andname\ \@unitstring{\@strctr}% -\fi -\else -\ifnum\@strctr<10 -\ifnum\@strctr=0 -\ifnum#1<100 \@unitstring{\@strctr}\fi -\else -\@unitstring{\@strctr}% +\ifnum#1>100\relax + \ifnum\@strctr>0\relax + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\ \@andname\ }% + \fi \fi +\ifnum\@strctr>29\relax + \divide\@strctr by 10\relax + \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 + \edef#2{\@@fc@numstr\ \@andname\ \@unitstring{\@strctr}}% + \fi \else -\ifnum\@strctr>19 -\@modulo{\@strctr}{10}% -\@twentystring{\@strctr}% -\else -\@modulo{\@strctr}{10}% -\@teenstring{\@strctr}% -\fi -\fi + \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 + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@unitstring{\@strctr}}% + \fi + \else + \ifnum\@strctr>19\relax + \@modulo{\@strctr}{10}% + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@twentystring{\@strctr}}% + \else + \@modulo{\@strctr}{10}% + \let\@@fc@numstr#2\relax + \edef#2{\@@fc@numstr\@teenstring{\@strctr}}% + \fi + \fi \fi } - -\newcommand{\@@ordinalstringspanish}[1]{% +\newcommand{\@@ordinalstringspanish}[2]{% \@strctr=#1\relax \ifnum#1>99999 \PackageError{fmtcount}{Out of range}% @@ -643,6 +637,7 @@ this number}% you can try typing "minus" first, and then pass the modulus of this number}% \else +\def#2{}% \ifnum\@strctr>999\relax \divide\@strctr by 1000\relax \ifnum\@strctr>1\relax @@ -650,48 +645,73 @@ this number}% \@tmpstrctr=\@strctr \ifnum\@strctr<20 \@modulo{\@tmpstrctr}{10}% - \@teenthstring{\@tmpstrctr} + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@teenthstring{\@tmpstrctr}}% \else \divide\@tmpstrctr by 10\relax - \@tenthstring{\@tmpstrctr} + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@tenthstring{\@tmpstrctr}}% \@tmpstrctr=\@strctr \@modulo{\@tmpstrctr}{10}% - \ifnum\@tmpstrctr>0\@unitthstring{\@tmpstrctr} \fi + \ifnum\@tmpstrctr>0\relax + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@unitthstring{\@tmpstrctr}}% + \fi \fi \else - \@unitstring{\@strctr} + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@unitstring{\@strctr}}% \fi \fi - \@thousandth + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@thousandth}% \fi \@strctr=#1\relax \@modulo{\@strctr}{1000}% \ifnum\@strctr>99\relax -\@tmpstrctr=\@strctr -\divide\@tmpstrctr by 100\relax -\ifnum#1>1000\ \fi -\@hundredthstring{\@tmpstrctr}% + \@tmpstrctr=\@strctr + \divide\@tmpstrctr by 100\relax + \ifnum#1>1000\relax + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\ }% + \fi + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@hundredthstring{\@tmpstrctr}}% \fi \@modulo{\@strctr}{100}% -\ifnum#1>99\ifnum\@strctr>0\ \fi\fi +\ifnum#1>99\relax + \ifnum\@strctr>0\relax + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\ }% + \fi +\fi \ifnum\@strctr>19\relax -\@tmpstrctr=\@strctr -\divide\@tmpstrctr by 10\relax -\@tenthstring{\@tmpstrctr}% -\@tmpstrctr=\@strctr -\@modulo{\@tmpstrctr}{10}% -\ifnum\@tmpstrctr>0\ \@unitthstring{\@tmpstrctr}\fi -\else -\ifnum\@strctr>9 -\@modulo{\@strctr}{10}% -\@teenthstring{\@strctr}% -\else -\ifnum\@strctr=0\relax -\ifnum#1=0\@unitstring{0}\fi + \@tmpstrctr=\@strctr + \divide\@tmpstrctr by 10\relax + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@tenthstring{\@tmpstrctr}}% + \@tmpstrctr=\@strctr + \@modulo{\@tmpstrctr}{10}% + \ifnum\@tmpstrctr>0\relax + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\ \@unitthstring{\@tmpstrctr}}% + \fi \else -\@unitthstring{\@strctr}% -\fi -\fi + \ifnum\@strctr>9\relax + \@modulo{\@strctr}{10}% + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@teenthstring{\@strctr}}% + \else + \ifnum\@strctr=0\relax + \ifnum#1=0\relax + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@unitstring{0}}% + \fi + \else + \let\@@fc@ordstr#2\relax + \edef#2{\@@fc@ordstr\@unitthstring{\@strctr}}% + \fi + \fi \fi \fi \fi |