summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fmtcount/fc-portuges.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/fmtcount/fc-portuges.def')
-rw-r--r--Master/texmf-dist/tex/latex/fmtcount/fc-portuges.def323
1 files changed, 181 insertions, 142 deletions
diff --git a/Master/texmf-dist/tex/latex/fmtcount/fc-portuges.def b/Master/texmf-dist/tex/latex/fmtcount/fc-portuges.def
index 8a18ff3a74d..7f77a013c15 100644
--- a/Master/texmf-dist/tex/latex/fmtcount/fc-portuges.def
+++ b/Master/texmf-dist/tex/latex/fmtcount/fc-portuges.def
@@ -26,13 +26,25 @@
%% Right bracket \] Circumflex \^ Underscore \_
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
-\ProvidesFile{fc-portuges.def}[2005/04/29]
-\newcommand{\@@unitstringportuges}[1]{%
+\ProvidesFile{fc-portuges.def}[2007/04/20]
+\newcommand*{\@ordinalMportuges}[2]{%
+\ifnum#1=0\relax
+ \edef#2{\number#1}%
+\else
+ \edef#2{\number#1\relax\noexpand\fmtord{o}}%
+\fi}
+\newcommand*{\@ordinalFportuges}[2]{%
+\ifnum#1=0\relax
+ \edef#2{\number#1}%
+\else
+ \edef#2{\number#1\relax\noexpand\fmtord{a}}%
+\fi}
+\newcommand*{\@@unitstringportuges}[1]{%
\ifcase#1\relax
zero%
\or um%
\or dois%
-\or tr\`es%
+\or tr\^es%
\or quatro%
\or cinco%
\or seis%
@@ -41,13 +53,12 @@ zero%
\or nove%
\fi
}
-
-\newcommand{\@@unitstringFportuges}[1]{%
+\newcommand*{\@@unitstringFportuges}[1]{%
\ifcase#1\relax
zero%
\or uma%
\or duas%
-\or tr\`es%
+\or tr\^es%
\or quatro%
\or cinco%
\or seis%
@@ -56,8 +67,7 @@ zero%
\or nove%
\fi
}
-
-\newcommand{\@@tenstringportuges}[1]{%
+\newcommand*{\@@tenstringportuges}[1]{%
\ifcase#1\relax
\or dez%
\or vinte%
@@ -71,8 +81,7 @@ zero%
\or cem%
\fi
}
-
-\newcommand{\@@teenstringportuges}[1]{%
+\newcommand*{\@@teenstringportuges}[1]{%
\ifcase#1\relax
dez%
\or onze%
@@ -86,8 +95,7 @@ dez%
\or dezenove%
\fi
}
-
-\newcommand{\@@hundredstringportuges}[1]{%
+\newcommand*{\@@hundredstringportuges}[1]{%
\ifcase#1\relax
\or cento%
\or duzentos%
@@ -99,10 +107,9 @@ dez%
\or oitocentos%
\or novecentos%
\fi}
-
-\newcommand{\@@hundredstringFportuges}[1]{%
+\newcommand*{\@@hundredstringFportuges}[1]{%
\ifcase#1\relax
-\or centa%
+\or cento%
\or duzentas%
\or trezentas%
\or quatrocentas%
@@ -112,13 +119,12 @@ dez%
\or oitocentas%
\or novecentas%
\fi}
-
-\newcommand{\@@Unitstringportuges}[1]{%
+\newcommand*{\@@Unitstringportuges}[1]{%
\ifcase#1\relax
Zero%
\or Um%
\or Dois%
-\or Tr\`es%
+\or Tr\^es%
\or Quatro%
\or Cinco%
\or Seis%
@@ -127,13 +133,12 @@ Zero%
\or Nove%
\fi
}
-
-\newcommand{\@@UnitstringFportuges}[1]{%
+\newcommand*{\@@UnitstringFportuges}[1]{%
\ifcase#1\relax
Zera%
\or Uma%
\or Duas%
-\or Tr\`es%
+\or Tr\^es%
\or Quatro%
\or Cinco%
\or Seis%
@@ -142,8 +147,7 @@ Zera%
\or Nove%
\fi
}
-
-\newcommand{\@@Tenstringportuges}[1]{%
+\newcommand*{\@@Tenstringportuges}[1]{%
\ifcase#1\relax
\or Dez%
\or Vinte%
@@ -157,8 +161,7 @@ Zera%
\or Cem%
\fi
}
-
-\newcommand{\@@Teenstringportuges}[1]{%
+\newcommand*{\@@Teenstringportuges}[1]{%
\ifcase#1\relax
Dez%
\or Onze%
@@ -172,8 +175,7 @@ Dez%
\or Dezenove%
\fi
}
-
-\newcommand{\@@Hundredstringportuges}[1]{%
+\newcommand*{\@@Hundredstringportuges}[1]{%
\ifcase#1\relax
\or Cento%
\or Duzentos%
@@ -185,10 +187,9 @@ Dez%
\or Oitocentos%
\or Novecentos%
\fi}
-
-\newcommand{\@@HundredstringFportuges}[1]{%
+\newcommand*{\@@HundredstringFportuges}[1]{%
\ifcase#1\relax
-\or Centa%
+\or Cento%
\or Duzentas%
\or Trezentas%
\or Quatrocentas%
@@ -198,85 +199,71 @@ Dez%
\or Oitocentas%
\or Novecentas%
\fi}
-
-\newcommand{\@numberstringMportuges}[1]{%
+\DeclareRobustCommand{\@numberstringMportuges}[2]{%
\let\@unitstring=\@@unitstringportuges
\let\@teenstring=\@@teenstringportuges
\let\@tenstring=\@@tenstringportuges
\let\@hundredstring=\@@hundredstringportuges
\def\@hundred{cem}\def\@thousand{mil}%
\def\@andname{e}%
-\@@numberstringportuges{#1}}
-
-\newcommand{\@numberstringFportuges}[1]{%
+\@@numberstringportuges{#1}{#2}}
+\DeclareRobustCommand{\@numberstringFportuges}[2]{%
\let\@unitstring=\@@unitstringFportuges
\let\@teenstring=\@@teenstringportuges
\let\@tenstring=\@@tenstringportuges
\let\@hundredstring=\@@hundredstringFportuges
\def\@hundred{cem}\def\@thousand{mil}%
\def\@andname{e}%
-\@@numberstringportuges{#1}}
-
-\newcommand{\@NumberstringMportuges}[1]{%
+\@@numberstringportuges{#1}{#2}}
+\DeclareRobustCommand{\@NumberstringMportuges}[2]{%
\let\@unitstring=\@@Unitstringportuges
\let\@teenstring=\@@Teenstringportuges
\let\@tenstring=\@@Tenstringportuges
\let\@hundredstring=\@@Hundredstringportuges
\def\@hundred{Cem}\def\@thousand{Mil}%
\def\@andname{e}%
-\@@numberstringportuges{#1}}
-
-\newcommand{\@NumberstringFportuges}[1]{%
+\@@numberstringportuges{#1}{#2}}
+\DeclareRobustCommand{\@NumberstringFportuges}[2]{%
\let\@unitstring=\@@UnitstringFportuges
\let\@teenstring=\@@Teenstringportuges
\let\@tenstring=\@@Tenstringportuges
\let\@hundredstring=\@@HundredstringFportuges
\def\@hundred{Cem}\def\@thousand{Mil}%
\def\@andname{e}%
-\@@numberstringportuges{#1}}
-
-\newcommand{\@ordinalstringMportuges}[1]{%
+\@@numberstringportuges{#1}{#2}}
+\DeclareRobustCommand{\@ordinalstringMportuges}[2]{%
\let\@unitthstring=\@@unitthstringportuges
\let\@unitstring=\@@unitstringportuges
\let\@teenthstring=\@@teenthstringportuges
\let\@tenthstring=\@@tenthstringportuges
\let\@hundredthstring=\@@hundredthstringportuges
\def\@thousandth{mil\'esimo}%
-\@@ordinalstringportuges{#1}}
-
-\newcommand{\@ordinalstringFportuges}[1]{%
+\@@ordinalstringportuges{#1}{#2}}
+\DeclareRobustCommand{\@ordinalstringFportuges}[2]{%
\let\@unitthstring=\@@unitthstringFportuges
\let\@unitstring=\@@unitstringFportuges
\let\@teenthstring=\@@teenthstringportuges
\let\@tenthstring=\@@tenthstringFportuges
\let\@hundredthstring=\@@hundredthstringFportuges
\def\@thousandth{mil\'esima}%
-\@@ordinalstringportuges{#1}}
-
-\newcommand{\@OrdinalstringMportuges}[1]{%
+\@@ordinalstringportuges{#1}{#2}}
+\DeclareRobustCommand{\@OrdinalstringMportuges}[2]{%
\let\@unitthstring=\@@Unitthstringportuges
\let\@unitstring=\@@Unitstringportuges
\let\@teenthstring=\@@teenthstringportuges
\let\@tenthstring=\@@Tenthstringportuges
\let\@hundredthstring=\@@Hundredthstringportuges
\def\@thousandth{Mil\'esimo}%
-\@@ordinalstringportuges{#1}}
-
-\newcommand{\@OrdinalstringFportuges}[1]{%
+\@@ordinalstringportuges{#1}{#2}}
+\DeclareRobustCommand{\@OrdinalstringFportuges}[2]{%
\let\@unitthstring=\@@UnitthstringFportuges
\let\@unitstring=\@@UnitstringFportuges
\let\@teenthstring=\@@teenthstringportuges
\let\@tenthstring=\@@TenthstringFportuges
\let\@hundredthstring=\@@HundredthstringFportuges
\def\@thousandth{Mil\'esima}%
-\@@ordinalstringportuges{#1}}
-
-\newcommand{\@ordinalMportuges}[1]{%
-#1\ifnum#1=0\else\fmtord{o}\fi}
-\newcommand{\@ordinalFportuges}[1]{%
-#1\ifnum#1=0\else\fmtord{a}\fi}
-
-\newcommand{\@@unitthstringportuges}[1]{%
+\@@ordinalstringportuges{#1}{#2}}
+\newcommand*{\@@unitthstringportuges}[1]{%
\ifcase#1\relax
zero%
\or primeiro%
@@ -290,8 +277,7 @@ zero%
\or nono%
\fi
}
-
-\newcommand{\@@tenthstringportuges}[1]{%
+\newcommand*{\@@tenthstringportuges}[1]{%
\ifcase#1\relax
\or d\'ecimo%
\or vig\'esimo%
@@ -304,14 +290,12 @@ zero%
\or nonag\'esimo%
\fi
}
-
-\newcommand{\@@teenthstringportuges}[1]{%
+\newcommand*{\@@teenthstringportuges}[1]{%
\@tenthstring{1}%
\ifnum#1>0\relax
-\@unitthstring{#1}%
\fi}
-
-\newcommand{\@@hundredthstringportuges}[1]{%
+\newcommand*{\@@hundredthstringportuges}[1]{%
\ifcase#1\relax
\or cent\'esimo%
\or ducent\'esimo%
@@ -323,8 +307,7 @@ zero%
\or octingent\'esimo%
\or nongent\'esimo%
\fi}
-
-\newcommand{\@@unitthstringFportuges}[1]{%
+\newcommand*{\@@unitthstringFportuges}[1]{%
\ifcase#1\relax
zero%
\or primeira%
@@ -338,8 +321,7 @@ zero%
\or nona%
\fi
}
-
-\newcommand{\@@tenthstringFportuges}[1]{%
+\newcommand*{\@@tenthstringFportuges}[1]{%
\ifcase#1\relax
\or d\'ecima%
\or vig\'esima%
@@ -352,8 +334,7 @@ zero%
\or nonag\'esima%
\fi
}
-
-\newcommand{\@@hundredthstringFportuges}[1]{%
+\newcommand*{\@@hundredthstringFportuges}[1]{%
\ifcase#1\relax
\or cent\'esima%
\or ducent\'esima%
@@ -365,8 +346,7 @@ zero%
\or octingent\'esima%
\or nongent\'esima%
\fi}
-
-\newcommand{\@@Unitthstringportuges}[1]{%
+\newcommand*{\@@Unitthstringportuges}[1]{%
\ifcase#1\relax
Zero%
\or Primeiro%
@@ -380,8 +360,7 @@ Zero%
\or Nono%
\fi
}
-
-\newcommand{\@@Tenthstringportuges}[1]{%
+\newcommand*{\@@Tenthstringportuges}[1]{%
\ifcase#1\relax
\or D\'ecimo%
\or Vig\'esimo%
@@ -394,8 +373,7 @@ Zero%
\or Nonag\'esimo%
\fi
}
-
-\newcommand{\@@Hundredthstringportuges}[1]{%
+\newcommand*{\@@Hundredthstringportuges}[1]{%
\ifcase#1\relax
\or Cent\'esimo%
\or Ducent\'esimo%
@@ -407,8 +385,7 @@ Zero%
\or Octingent\'esimo%
\or Nongent\'esimo%
\fi}
-
-\newcommand{\@@UnitthstringFportuges}[1]{%
+\newcommand*{\@@UnitthstringFportuges}[1]{%
\ifcase#1\relax
Zera%
\or Primeira%
@@ -422,8 +399,7 @@ Zera%
\or Nona%
\fi
}
-
-\newcommand{\@@TenthstringFportuges}[1]{%
+\newcommand*{\@@TenthstringFportuges}[1]{%
\ifcase#1\relax
\or D\'ecima%
\or Vig\'esima%
@@ -436,8 +412,7 @@ Zera%
\or Nonag\'esima%
\fi
}
-
-\newcommand{\@@HundredthstringFportuges}[1]{%
+\newcommand*{\@@HundredthstringFportuges}[1]{%
\ifcase#1\relax
\or Cent\'esima%
\or Ducent\'esima%
@@ -449,7 +424,7 @@ Zera%
\or Octingent\'esima%
\or Nongent\'esima%
\fi}
-\newcommand{\@@numberstringportuges}[1]{%
+\newcommand*{\@@numberstringportuges}[2]{%
\ifnum#1>99999
\PackageError{fmtcount}{Out of range}%
{This macro only works for values less than 100000}%
@@ -461,63 +436,102 @@ 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}%
+ \ifnum\@strctr>1\relax
+ \let\@@fc@numstr#2\relax
+ \edef#2{\@@fc@numstr\@tenstring{\@strctr}}%
\@strctr=#1 \divide\@strctr by 1000\relax
\@modulo{\@strctr}{10}%
\ifnum\@strctr>0
- \ifnum\@strctr=1\ \@andname\fi
- \ \@unitstring{\@strctr}%
+ \ifnum\@strctr=1\relax
+ \let\@@fc@numstr#2\relax
+ \edef#2{\@@fc@numstr\ \@andname}%
+ \fi
+ \let\@@fc@numstr#2\relax
+ \edef#2{\@@fc@numstr\ \@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}%
+ \let\@@fc@numstr#2\relax
+ \ifnum\@tmpstrctr=100\relax
+ \edef#2{\@@fc@numstr\@tenstring{10}}%
+ \else
+ \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>19
-\divide\@strctr by 10
-\@tenstring{\@strctr}%
-\@strctr=#1\relax \@modulo{\@strctr}{10}%
-\ifnum\@strctr>0
-\ifnum\@strctr=1\ \@andname\else\ifnum#1>100\ \@andname\fi\fi
-\ \@unitstring{\@strctr}%
+\ifnum#1>100\relax
+ \ifnum\@strctr>0\relax
+ \let\@@fc@numstr#2\relax
+ \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}%
+ \ifnum\@strctr>0
+ \ifnum\@strctr=1\relax
+ \let\@@fc@numstr#2\relax
+ \edef#2{\@@fc@numstr\ \@andname}%
+ \else
+ \ifnum#1>100\relax
+ \let\@@fc@numstr#2\relax
+ \edef#2{\@@fc@numstr\ \@andname}%
+ \fi
+ \fi
+ \let\@@fc@numstr#2\relax
+ \edef#2{\@@fc@numstr\ \@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<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{\@@ordinalstringportuges}[1]{%
+\newcommand*{\@@ordinalstringportuges}[2]{%
\@strctr=#1\relax
\ifnum#1>99999
\PackageError{fmtcount}{Out of range}%
@@ -529,6 +543,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
@@ -536,43 +551,67 @@ 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>9\relax
-\@tmpstrctr=\@strctr
-\divide\@tmpstrctr by 10\relax
-\@tenthstring{\@tmpstrctr}%
-\@tmpstrctr=\@strctr
-\@modulo{\@tmpstrctr}{10}%
-\ifnum\@tmpstrctr>0-\@unitthstring{\@tmpstrctr}\fi
-\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
+ \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