diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/fmtcount/fc-portuges.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/fmtcount/fc-portuges.def | 201 |
1 files changed, 115 insertions, 86 deletions
diff --git a/Master/texmf-dist/tex/latex/fmtcount/fc-portuges.def b/Master/texmf-dist/tex/latex/fmtcount/fc-portuges.def index 015629fb1ff..52262fa5745 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fc-portuges.def +++ b/Master/texmf-dist/tex/latex/fmtcount/fc-portuges.def @@ -7,7 +7,7 @@ %% fmtcount.dtx (with options: `fc-portuges.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 @@ -48,23 +48,25 @@ %%\begin{definition}[\DescribeMacro{\latinnumeralstringnum}] %%\cs{latinnumeralstringnum}\marg{number}\oarg{prefix options} %%\end{definition} -\ProvidesFCLanguage{portuges}[2013/08/17]% -\gdef\@ordinalMportuges#1#2{% +\ProvidesFCLanguage{portuges}[2014/06/09]% +\newcommand*\@ordinalMportuges[2]{% \ifnum#1=0\relax \edef#2{\number#1}% \else \edef#2{\number#1\relax\noexpand\fmtord{o}}% \fi }% -\gdef\@ordinalFportuges#1#2{% +\global\let\@ordinalMportuges\@ordinalMportuges +\newcommand*\@ordinalFportuges[2]{% \ifnum#1=0\relax \edef#2{\number#1}% \else \edef#2{\number#1\relax\noexpand\fmtord{a}}% \fi }% +\global\let\@ordinalFportuges\@ordinalFportuges \global\let\@ordinalNportuges\@ordinalMportuges -\gdef\@@unitstringportuges#1#2{% +\newcommand*\@@unitstringportuges[1]{% \ifcase#1\relax zero% \or um% @@ -78,7 +80,8 @@ \or nove% \fi }% -\gdef\@@unitstringFportuges#1{% +\global\let\@@unitstringportuges\@@unitstringportuges +\newcommand*\@@unitstringFportuges[1]{% \ifcase#1\relax zero% \or uma% @@ -92,7 +95,8 @@ \or nove% \fi }% -\gdef\@@tenstringportuges#1{% +\global\let\@@unitstringFportuges\@@unitstringFportuges +\newcommand*\@@tenstringportuges[1]{% \ifcase#1\relax \or dez% \or vinte% @@ -106,7 +110,8 @@ \or cem% \fi }% -\gdef\@@teenstringportuges#1{% +\global\let\@@tenstringportuges\@@tenstringportuges +\newcommand*\@@teenstringportuges[1]{% \ifcase#1\relax dez% \or onze% @@ -120,7 +125,8 @@ \or dezenove% \fi }% -\gdef\@@hundredstringportuges#1{% +\global\let\@@teenstringportuges\@@teenstringportuges +\newcommand*\@@hundredstringportuges[1]{% \ifcase#1\relax \or cento% \or duzentos% @@ -133,7 +139,8 @@ \or novecentos% \fi }% -\gdef\@@hundredstringFportuges#1{% +\global\let\@@hundredstringportuges\@@hundredstringportuges +\newcommand*\@@hundredstringFportuges[1]{% \ifcase#1\relax \or cento% \or duzentas% @@ -146,7 +153,8 @@ \or novecentas% \fi }% -\gdef\@@Unitstringportuges#1{% +\global\let\@@hundredstringFportuges\@@hundredstringFportuges +\newcommand*\@@Unitstringportuges[1]{% \ifcase#1\relax Zero% \or Um% @@ -160,7 +168,8 @@ \or Nove% \fi }% -\gdef\@@UnitstringFportuges#1{% +\global\let\@@Unitstringportuges\@@Unitstringportuges +\newcommand*\@@UnitstringFportuges[1]{% \ifcase#1\relax Zera% \or Uma% @@ -174,7 +183,8 @@ \or Nove% \fi }% -\gdef\@@Tenstringportuges#1{% +\global\let\@@UnitstringFportuges\@@UnitstringFportuges +\newcommand*\@@Tenstringportuges[1]{% \ifcase#1\relax \or Dez% \or Vinte% @@ -188,7 +198,8 @@ \or Cem% \fi }% -\gdef\@@Teenstringportuges#1{% +\global\let\@@Tenstringportuges\@@Tenstringportuges +\newcommand*\@@Teenstringportuges[1]{% \ifcase#1\relax Dez% \or Onze% @@ -202,7 +213,8 @@ \or Dezenove% \fi }% -\gdef\@@Hundredstringportuges#1{% +\global\let\@@Teenstringportuges\@@Teenstringportuges +\newcommand*\@@Hundredstringportuges[1]{% \ifcase#1\relax \or Cento% \or Duzentos% @@ -215,7 +227,8 @@ \or Novecentos% \fi }% -\gdef\@@HundredstringFportuges#1{% +\global\let\@@Hundredstringportuges\@@Hundredstringportuges +\newcommand*\@@HundredstringFportuges[1]{% \ifcase#1\relax \or Cento% \or Duzentas% @@ -228,6 +241,7 @@ \or Novecentas% \fi }% +\global\let\@@HundredstringFportuges\@@HundredstringFportuges \DeclareRobustCommand{\@numberstringMportuges}[2]{% \let\@unitstring=\@@unitstringportuges \let\@teenstring=\@@teenstringportuges @@ -312,7 +326,7 @@ }% \global\let\@OrdinalstringFportuges\@OrdinalstringFportuges \global\let\@OrdinalstringNportuges\@OrdinalstringMportuges -\gdef\@@unitthstringportuges#1{% +\newcommand*\@@unitthstringportuges[1]{% \ifcase#1\relax zero% \or primeiro% @@ -326,7 +340,8 @@ \or nono% \fi }% -\gdef\@@tenthstringportuges#1{% +\global\let\@@unitthstringportuges\@@unitthstringportuges +\newcommand*\@@tenthstringportuges[1]{% \ifcase#1\relax \or d\'ecimo% \or vig\'esimo% @@ -339,13 +354,15 @@ \or nonag\'esimo% \fi }% -\gdef\@@teenthstringportuges#1{% +\global\let\@@tenthstringportuges\@@tenthstringportuges +\newcommand*\@@teenthstringportuges[1]{% \@tenthstring{1}% \ifnum#1>0\relax -\@unitthstring{#1}% \fi }% -\gdef\@@hundredthstringportuges#1{% +\global\let\@@teenthstringportuges\@@teenthstringportuges +\newcommand*\@@hundredthstringportuges[1]{% \ifcase#1\relax \or cent\'esimo% \or ducent\'esimo% @@ -358,7 +375,8 @@ \or nongent\'esimo% \fi }% -\gdef\@@unitthstringFportuges#1{% +\global\let\@@hundredthstringportuges\@@hundredthstringportuges +\newcommand*\@@unitthstringFportuges[1]{% \ifcase#1\relax zero% \or primeira% @@ -372,7 +390,8 @@ \or nona% \fi }% -\gdef\@@tenthstringFportuges#1{% +\global\let\@@unitthstringFportuges\@@unitthstringFportuges +\newcommand*\@@tenthstringFportuges[1]{% \ifcase#1\relax \or d\'ecima% \or vig\'esima% @@ -385,7 +404,8 @@ \or nonag\'esima% \fi }% -\gdef\@@hundredthstringFportuges#1{% +\global\let\@@tenthstringFportuges\@@tenthstringFportuges +\newcommand*\@@hundredthstringFportuges[1]{% \ifcase#1\relax \or cent\'esima% \or ducent\'esima% @@ -398,7 +418,8 @@ \or nongent\'esima% \fi }% -\gdef\@@Unitthstringportuges#1{% +\global\let\@@hundredthstringFportuges\@@hundredthstringFportuges +\newcommand*\@@Unitthstringportuges[1]{% \ifcase#1\relax Zero% \or Primeiro% @@ -412,7 +433,8 @@ \or Nono% \fi }% -\gdef\@@Tenthstringportuges#1{% +\global\let\@@Unitthstringportuges\@@Unitthstringportuges +\newcommand*\@@Tenthstringportuges[1]{% \ifcase#1\relax \or D\'ecimo% \or Vig\'esimo% @@ -425,7 +447,8 @@ \or Nonag\'esimo% \fi }% -\gdef\@@Hundredthstringportuges#1{% +\global\let\@@Tenthstringportuges\@@Tenthstringportuges +\newcommand*\@@Hundredthstringportuges[1]{% \ifcase#1\relax \or Cent\'esimo% \or Ducent\'esimo% @@ -438,7 +461,8 @@ \or Nongent\'esimo% \fi }% -\gdef\@@UnitthstringFportuges#1{% +\global\let\@@Hundredthstringportuges\@@Hundredthstringportuges +\newcommand*\@@UnitthstringFportuges[1]{% \ifcase#1\relax Zera% \or Primeira% @@ -452,7 +476,8 @@ \or Nona% \fi }% -\gdef\@@TenthstringFportuges#1{% +\global\let\@@UnitthstringFportuges\@@UnitthstringFportuges +\newcommand*\@@TenthstringFportuges[1]{% \ifcase#1\relax \or D\'ecima% \or Vig\'esima% @@ -465,7 +490,8 @@ \or Nonag\'esima% \fi }% -\gdef\@@HundredthstringFportuges#1{% +\global\let\@@TenthstringFportuges\@@TenthstringFportuges +\newcommand*\@@HundredthstringFportuges[1]{% \ifcase#1\relax \or Cent\'esima% \or Ducent\'esima% @@ -478,114 +504,116 @@ \or Nongent\'esima% \fi }% -\gdef\@@numberstringportuges#1#2{% -\ifnum#1>99999 -\PackageError{fmtcount}{Out of range}% -{This macro only works for values less than 100000}% +\global\let\@@HundredthstringFportuges\@@HundredthstringFportuges +\newcommand*\@@numberstringportuges[2]{% +\ifnum#1>99999\relax + \PackageError{fmtcount}{Out of range}% + {This macro only works for values less than 100000}% \else -\ifnum#1<0 -\PackageError{fmtcount}{Negative numbers not permitted}% -{This macro does not work for negative numbers, however -you can try typing "minus" first, and then pass the modulus of -this number}% -\fi + \ifnum#1<0\relax + \PackageError{fmtcount}{Negative numbers not permitted}% + {This macro does not work for negative numbers, however + 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>9\relax + \divide\@strctr by 10\relax \ifnum\@strctr>1\relax \let\@@fc@numstr#2\relax - \edef#2{\@@fc@numstr\@tenstring{\@strctr}}% + \protected@edef#2{\@@fc@numstr\@tenstring{\@strctr}}% \@strctr=#1 \divide\@strctr by 1000\relax - \@modulo{\@strctr}{10}% + \@FCmodulo{\@strctr}{10}% \ifnum\@strctr>0 \ifnum\@strctr=1\relax \let\@@fc@numstr#2\relax - \edef#2{\@@fc@numstr\ \@andname}% + \protected@edef#2{\@@fc@numstr\ \@andname}% \fi \let\@@fc@numstr#2\relax - \edef#2{\@@fc@numstr\ \@unitstring{\@strctr}}% + \protected@edef#2{\@@fc@numstr\ \@unitstring{\@strctr}}% \fi \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}}% + \protected@edef#2{\@@fc@numstr\@teenstring{\@strctr}}% \fi \let\@@fc@numstr#2\relax - \edef#2{\@@fc@numstr\ \@thousand}% + \protected@edef#2{\@@fc@numstr\ \@thousand}% \else \ifnum\@strctr>0\relax \ifnum\@strctr>1\relax \let\@@fc@numstr#2\relax - \edef#2{\@@fc@numstr\@unitstring{\@strctr}\ }% + \protected@edef#2{\@@fc@numstr\@unitstring{\@strctr}\ }% \fi \let\@@fc@numstr#2\relax - \edef#2{\@@fc@numstr\@thousand}% + \protected@edef#2{\@@fc@numstr\@thousand}% \fi \fi -\@strctr=#1\relax \@modulo{\@strctr}{1000}% +\@strctr=#1\relax \@FCmodulo{\@strctr}{1000}% \divide\@strctr by 100\relax \ifnum\@strctr>0\relax \ifnum#1>1000 \relax \let\@@fc@numstr#2\relax - \edef#2{\@@fc@numstr\ }% + \protected@edef#2{\@@fc@numstr\ }% \fi \@tmpstrctr=#1\relax - \@modulo{\@tmpstrctr}{1000}% + \@FCmodulo{\@tmpstrctr}{1000}% \let\@@fc@numstr#2\relax \ifnum\@tmpstrctr=100\relax - \edef#2{\@@fc@numstr\@tenstring{10}}% + \protected@edef#2{\@@fc@numstr\@tenstring{10}}% \else - \edef#2{\@@fc@numstr\@hundredstring{\@strctr}}% + \protected@edef#2{\@@fc@numstr\@hundredstring{\@strctr}}% \fi% \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 - \edef#2{\@@fc@numstr\ \@andname\ }% + \protected@edef#2{\@@fc@numstr\ \@andname\ }% \fi \fi \ifnum\@strctr>19\relax \divide\@strctr by 10\relax \let\@@fc@numstr#2\relax - \edef#2{\@@fc@numstr\@tenstring{\@strctr}}% - \@strctr=#1\relax \@modulo{\@strctr}{10}% + \protected@edef#2{\@@fc@numstr\@tenstring{\@strctr}}% + \@strctr=#1\relax \@FCmodulo{\@strctr}{10}% \ifnum\@strctr>0 \ifnum\@strctr=1\relax \let\@@fc@numstr#2\relax - \edef#2{\@@fc@numstr\ \@andname}% + \protected@edef#2{\@@fc@numstr\ \@andname}% \else \ifnum#1>100\relax \let\@@fc@numstr#2\relax - \edef#2{\@@fc@numstr\ \@andname}% + \protected@edef#2{\@@fc@numstr\ \@andname}% \fi \fi \let\@@fc@numstr#2\relax - \edef#2{\@@fc@numstr\ \@unitstring{\@strctr}}% + \protected@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}}% + \protected@edef#2{\@@fc@numstr\@unitstring{\@strctr}}% \fi - \else%(>0,<10) + \else %(>0,<10) \let\@@fc@numstr#2\relax - \edef#2{\@@fc@numstr\@unitstring{\@strctr}}% + \protected@edef#2{\@@fc@numstr\@unitstring{\@strctr}}% \fi \else%>10 - \@modulo{\@strctr}{10}% + \@FCmodulo{\@strctr}{10}% \let\@@fc@numstr#2\relax - \edef#2{\@@fc@numstr\@teenstring{\@strctr}}% + \protected@edef#2{\@@fc@numstr\@teenstring{\@strctr}}% \fi \fi }% -\gdef\@@ordinalstringportuges#1#2{% +\global\let\@@numberstringportuges\@@numberstringportuges +\newcommand*\@@ordinalstringportuges[2]{% \@strctr=#1\relax \ifnum#1>99999 \PackageError{fmtcount}{Out of range}% @@ -604,72 +632,73 @@ this number}% \ifnum\@strctr>9\relax \@tmpstrctr=\@strctr \ifnum\@strctr<20 - \@modulo{\@tmpstrctr}{10}% + \@FCmodulo{\@tmpstrctr}{10}% \let\@@fc@ordstr#2\relax - \edef#2{\@@fc@ordstr\@teenthstring{\@tmpstrctr}}% + \protected@edef#2{\@@fc@ordstr\@teenthstring{\@tmpstrctr}}% \else \divide\@tmpstrctr by 10\relax \let\@@fc@ordstr#2\relax - \edef#2{\@@fc@ordstr\@tenthstring{\@tmpstrctr}}% + \protected@edef#2{\@@fc@ordstr\@tenthstring{\@tmpstrctr}}% \@tmpstrctr=\@strctr - \@modulo{\@tmpstrctr}{10}% + \@FCmodulo{\@tmpstrctr}{10}% \ifnum\@tmpstrctr>0\relax \let\@@fc@ordstr#2\relax - \edef#2{\@@fc@ordstr\@unitthstring{\@tmpstrctr}}% + \protected@edef#2{\@@fc@ordstr\@unitthstring{\@tmpstrctr}}% \fi \fi \else \let\@@fc@ordstr#2\relax - \edef#2{\@@fc@ordstr\@unitstring{\@strctr}}% + \protected@edef#2{\@@fc@ordstr\@unitstring{\@strctr}}% \fi \fi \let\@@fc@ordstr#2\relax - \edef#2{\@@fc@ordstr\@thousandth}% + \protected@edef#2{\@@fc@ordstr\@thousandth}% \fi \@strctr=#1\relax -\@modulo{\@strctr}{1000}% +\@FCmodulo{\@strctr}{1000}% \ifnum\@strctr>99\relax \@tmpstrctr=\@strctr \divide\@tmpstrctr by 100\relax \ifnum#1>1000\relax \let\@@fc@ordstr#2\relax - \edef#2{\@@fc@ordstr-}% + \protected@edef#2{\@@fc@ordstr-}% \fi \let\@@fc@ordstr#2\relax - \edef#2{\@@fc@ordstr\@hundredthstring{\@tmpstrctr}}% + \protected@edef#2{\@@fc@ordstr\@hundredthstring{\@tmpstrctr}}% \fi -\@modulo{\@strctr}{100}% +\@FCmodulo{\@strctr}{100}% \ifnum#1>99\relax \ifnum\@strctr>0\relax \let\@@fc@ordstr#2\relax - \edef#2{\@@fc@ordstr-}% + \protected@edef#2{\@@fc@ordstr-}% \fi \fi \ifnum\@strctr>9\relax \@tmpstrctr=\@strctr \divide\@tmpstrctr by 10\relax \let\@@fc@ordstr#2\relax - \edef#2{\@@fc@ordstr\@tenthstring{\@tmpstrctr}}% + \protected@edef#2{\@@fc@ordstr\@tenthstring{\@tmpstrctr}}% \@tmpstrctr=\@strctr - \@modulo{\@tmpstrctr}{10}% + \@FCmodulo{\@tmpstrctr}{10}% \ifnum\@tmpstrctr>0\relax \let\@@fc@ordstr#2\relax - \edef#2{\@@fc@ordstr-\@unitthstring{\@tmpstrctr}}% + \protected@edef#2{\@@fc@ordstr-\@unitthstring{\@tmpstrctr}}% \fi \else \ifnum\@strctr=0\relax \ifnum#1=0\relax \let\@@fc@ordstr#2\relax - \edef#2{\@@fc@ordstr\@unitstring{0}}% + \protected@edef#2{\@@fc@ordstr\@unitstring{0}}% \fi \else \let\@@fc@ordstr#2\relax - \edef#2{\@@fc@ordstr\@unitthstring{\@strctr}}% + \protected@edef#2{\@@fc@ordstr\@unitthstring{\@strctr}}% \fi \fi \fi \fi }% +\global\let\@@ordinalstringportuges\@@ordinalstringportuges \endinput %% %% End of file `fc-portuges.def'. |