vincentb1 / fmtcount

Source for LaTeX fmtcount package
11 stars 5 forks source link

On the fly language loading does not work because use \global\let does not account for \DeclareRobustCommand trick #11

Closed vincentb1 closed 8 years ago

vincentb1 commented 9 years ago

Assume that you select some language that has not been loaded. fmtcount tries to load it on the fly. However that sort of thing

\DeclareRobustCommand{\@numberstringMenglish}[2]{%
   [... SNIP ...]
}%
\global\let\@numberstringMenglish\@numberstringMenglish`

does not work. The reason for that is that \DeclareRobustCommand not only defines a \@numberstringMenglish macro, but also a \csname @numberstringMenglish \endcsname (with a tailing space in name) macro. So the latter also needs to be \global\let processed.

vincentb1 commented 8 years ago

Ok, I have sorted this out and added tests for this.

The correction is that all the \DeclareRobustCommand are replaced by plain \newcommand*. This is possible now that issue #18 correction has placed robustness handling at the top level.

For file fc-french.def, that was a little trickier, as there are also options handling macros. I have not really tested whether these macro would work if fc-french.def was loaded from within a group.