vincentb1 / fmtcount

Source for LaTeX fmtcount package
11 stars 5 forks source link

No capital in French feminine form `\Numberstringnum{1}[f]` #44

Open jejust opened 2 years ago

jejust commented 2 years ago

Hello @vincentb1,

When using \Numberstringnum{1}[f] in French, the first letter is not capitalized, while it should be rendered as « Une » (see example below). I guess it should be handled in this macro, in file fc-french.def:

\def\fc@@nbrstr@Fpostamble{%
  \let\fc@wcase\fc@wcase@save
  \expandafter\fc@get@last@word\expandafter{\@tempa}\@tempb\@tempc
  \def\@tempd{un}%
  \ifx\@tempc\@tempd
    \let\@tempc\@tempa
    \edef\@tempa{\@tempb\fc@wcase une\@nil}%
  \fi
}%

but I haven't been able to correct it. I'm using the code from GitHub.

Here is an example:

\documentclass[french]{article}
  \usepackage{fmtcount}
  \usepackage{babel}

\begin{document}

\Numberstringnum{1}[f] pomme et \numberstringnum{1}[f] orange.

\Numberstringnum{2}[f] pommes et \numberstringnum{2}[f] oranges.

\medskip
\Numberstringnum{1}[m] kiwi et \numberstringnum{1}[m] abricot.

\Numberstringnum{2}[m] kiwis et \numberstringnum{2}[m] abricots.

\end{document}

numberstringnum_f_capital

Best regards, Jérémy.