I want to convert a number to string at the beginning of a sentence.
Using the builtin functions in memoir class works fine… in english only. Thus I use the fmtcount package. However string from number is not correctly capitalised: for instance
\Numberstringnum{24}
leads to “Twenty-Four“ when I want “Twenty-four“.
I tried this solution, with no success…
Here is my MWE
% !TeX TS-encoding = utf8
% !TeX TS-spellcheck = fr_FR
% !BIB TS-program = biber
% !TeX TS-program = lualatex
\documentclass[12pt, a4paper]{memoir}
\RequirePackage[utf8]{luainputenc}
\RequirePackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{Linux Libertine O}
\setsansfont{Linux Biolinum O}
\RequirePackage{polyglossia}
\setmainlanguage{french}
\setotherlanguage[variant=british]{english}
\RequirePackage{fmtcount}
\FCloadlang{francais}
\fmtcountsetoptions{french={all plural=traditional}}
\usepackage{xparse}
\ExplSyntaxOn
\DeclareExpandableDocumentCommand \firstcap { m } { \tl_mixed_case:n {#1} }
\ExplSyntaxOff
\begin{document}
% Works fine… but only in english
\ordinaltoName{25}
% Works but every first letter capitalised
\Numberstring{part}
\Numberstringnum{1987}
\firstcap{qsdfg wxcvvcr} % works
%\firstcap{\numberstringnum{1987}} % leads to error « Improper alphabetic constant. »
\end{document}



\RequirePackage[utf8]{luainputenc}?this can be used for solving some specific compatibility issues but it disables most of the benefits of luatex's Unicode font support. – David Carlisle Jan 03 '18 at 22:25fmtcountwas updated. Previously, luatex was not correctly detected. Under certain circumstances, a luatex user might find that the text was positioned incorrectly. Now it has been fixed, I believe. Also, be sure to loadpolyglossia, and set the default language, before loadingfmtcount. – Jan 03 '18 at 22:58