vincentb1 / fmtcount

Source for LaTeX fmtcount package
11 stars 5 forks source link

Ordinal numbers in portuguese #50

Open SdotVdot opened 1 year ago

SdotVdot commented 1 year ago

How to remove the hyphen from ordinal numbers in portuguese?

For example, the command output \ OrdinalStringnum {21} is: vigésimo-primeiro

But it should be vigésimo primeiro.

vincentb1 commented 1 year ago

I am afraid it is hard coded in the package, in the line

  \protected@edef#2{\@@fc@ordstr-}%

which one can find here (lines 770/787)

\ifnum\@strctr>99\relax
  \@tmpstrctr=\@strctr
  \divide\@tmpstrctr by 100\relax
  \ifnum#1>1000\relax
    \let\@@fc@ordstr#2\relax
    \protected@edef#2{\@@fc@ordstr-}%
  \fi
  \let\@@fc@ordstr#2\relax
  \protected@edef#2{\@@fc@ordstr\@hundredthstring{\@tmpstrctr}}%
\fi
\@FCmodulo{\@strctr}{100}%
\ifnum#1>99\relax
  \ifnum\@strctr>0\relax
    \let\@@fc@ordstr#2\relax
    \protected@edef#2{\@@fc@ordstr-}%
  \fi
\fi

Is this no-hyphen the same for Portugese and Brazilian ?

Vincent.

SdotVdot commented 1 year ago

Is this no-hyphen the same for Portugese and Brazilian ? Vincent.

Yes, it is the same for both brazilian portuguese and european portuguese.