diff options
Diffstat (limited to 'Master/texmf-dist')
26 files changed, 1109 insertions, 890 deletions
diff --git a/Master/texmf-dist/doc/latex/fmtcount/CHANGES b/Master/texmf-dist/doc/latex/fmtcount/CHANGES index 6e23a87d5fc..8242525261f 100644 --- a/Master/texmf-dist/doc/latex/fmtcount/CHANGES +++ b/Master/texmf-dist/doc/latex/fmtcount/CHANGES @@ -1,5 +1,18 @@ fmtcount package versions: +Version 3.02: + +* Fix issue #24 (Capitalization in French). + +* Fix issue #11 (Make lang definition .def files loadable from within + a group). + +* Fix issue #18 (no impact for end user, code optimization for + \storeordinal definition). + +* Make robust \FCordinal, \storeordinal, \ordinalnum, and + \storeordinalnum + Version 3.01: * Make fmtord option language dependant diff --git a/Master/texmf-dist/doc/latex/fmtcount/README b/Master/texmf-dist/doc/latex/fmtcount/README index e4ba96130ad..8ea754f59a3 100644 --- a/Master/texmf-dist/doc/latex/fmtcount/README +++ b/Master/texmf-dist/doc/latex/fmtcount/README @@ -1,6 +1,6 @@ -LaTeX Package : fmtcount v3.01 +LaTeX Package : fmtcount v3.02 -Last Modified : 2015-05-05 +Last Modified : 2017-06-15 Author : Nicola Talbot and Vincent Belaïche diff --git a/Master/texmf-dist/doc/latex/fmtcount/fc-frlargenum.tex b/Master/texmf-dist/doc/latex/fmtcount/fc-frlargenum.tex deleted file mode 100644 index 33c769328e2..00000000000 --- a/Master/texmf-dist/doc/latex/fmtcount/fc-frlargenum.tex +++ /dev/null @@ -1,130 +0,0 @@ - % This file is public domain - -\documentclass{article} -\usepackage[french]{babel} -\usepackage{fmtcount} -\usepackage{array} -\usepackage{amsmath} -\usepackage{xcolor} -\usepackage[T1]{fontenc} -\newcommand*\formatterundertest[1]{} -\makeatletter -\newcommand*{\printrow}[2]{% - \def\@tempa{#1}% - \ifx\@tempa\@empty\else - \texttt{\textbackslash fmtsetoptions\{french=\{#1\}\}}\newline - \fmtcountsetoptions{french={#1}}% - \fi - \begin{tabular}{@{}>{\raggedleft\arraybackslash}p{\dimexpr0.3\linewidth-\tabcolsep}>{\raggedright\arraybackslash}p{\dimexpr0.7\linewidth-\tabcolsep}@{}}% - #2&$\rangle$\formatterundertest{#2}$\langle$\\\hline - \end{tabular}\newline - \def\@tempb{% - \ifx\@tempa\space - \expandafter\@gobble - \fi - }% - \futurelet\@tempa\@tempb -} -\def\fc@frenchoptions@submillion@dos{$\bullet$\-$\bullet$} -\def\fc@frenchoptions@supermillion@dos{$\star$\-$\star$} - -\makeatother -\newcommand*\test{\noindent -\printrow{all plural}{1} -\printrow{}{2} -\printrow{}{3} -\printrow{}{4} -\printrow{}{5} -\printrow{}{6} -\printrow{}{7} -\printrow{}{8} -\printrow{}{9} -\printrow{}{10} -\printrow{}{11} -\printrow{}{12} -\printrow{}{13} -\printrow{}{14} -\printrow{}{15} -\printrow{}{16} -\printrow{}{17} -\printrow{}{18} -\printrow{}{19} -\printrow{}{20} -\printrow{}{21} -\printrow{}{22} -\printrow{}{29} -\printrow{scale=long}{1 000 000 000 000 000 000 000 000 000 000 000 000 000} -\printrow{scale=short}{1 000 000 000 000 000 000 000 000 000 000 000 000 000} -\printrow{scale=recursive}{1 000 000 000 000 000 000 000 000 000 000 000 000 000} -\printrow{}{1 000 000 000 000 000 000 000 000 000 000 000 000} -\printrow{}{1 000 000 000 000 000 000 000 000 000 000 000} -\printrow{}{1 000 000 000 000 000 000 000 000 000 000} -\printrow{scale=long}{2 000 000 000 000 000 000 000 000 000 000 000 000 000} -\printrow{scale=short}{2 000 000 000 000 000 000 000 000 000 000 000 000 000} -\printrow{scale=recursive}{2 000 000 000 000 000 000 000 000 000 000 000 000 000} -\printrow{}{2 000 000 000 000 000 000 000 000 000 000 000 000} -\printrow{}{2 000 000 000 000 000 000 000 000 000 000 000} -\printrow{}{2 000 000 000 000 000 000 000 000 000 000} -\printrow{}{156 404 724 555 428 769 499 217 321 941} -\printrow{}{4 171 764 135 702 262 349 567 001 574 584} -\printrow{}{97 415 427 916 562 250 398 973 107 371 704} -\printrow{}{80} -\printrow{}{81} -\printrow{}{21} -\printrow{}{31} -\printrow{}{200} -\printrow{}{201} -\printrow{}{200 000} -\printrow{}{200 000 000} -\printrow{}{201 000 000} -\printrow{}{80 000} -\printrow{}{80 000 000} -\printrow{}{81 000} -\printrow{}{81 000 000} -\printrow{all plural,mil plural=multiple}{1000} -\printrow{}{2000} -\printrow{}{1001} -\printrow{}{2001} -\printrow{}{1900} -\printrow{}{2012} -\printrow{}{900} -\printrow{all plural,mil plural=multiple,mil plural mark=s}{2000} -} - -\begin{document} - -\section{\textbackslash numberstringnum\{\#1\}} -\def\formatterundertest#1{\numberstringnum{#1}} -\test - -\section{\textbackslash numberstringnum\{\#1\}[f]} -\def\formatterundertest#1{\numberstringnum{#1}[f]} -\test - -\section{\textbackslash ordinalstringnum\{\#1\}} -\def\formatterundertest#1{\ordinalstringnum{#1}} -\test - -\section{\textbackslash ordinalstringnum\{\#1\}[f]} -\def\formatterundertest#1{\ordinalstringnum{#1}[f]} -\test - -\section{\textbackslash Numberstringnum\{\#1\}} -\def\formatterundertest#1{\Numberstringnum{#1}} -\test - -\section{\textbackslash Numberstringnum\{\#1\}[f]} -\def\formatterundertest#1{\Numberstringnum{#1}[f]} -\test - -\section{\textbackslash Ordinalstringnum\{\#1\}} -\def\formatterundertest#1{\Ordinalstringnum{#1}} -\test - -\section{\textbackslash Ordinalstringnum\{\#1\}[f]} -\def\formatterundertest#1{\Ordinalstringnum{#1}[f]} -\test - - - -\end{document} diff --git a/Master/texmf-dist/doc/latex/fmtcount/fc-samp.tex b/Master/texmf-dist/doc/latex/fmtcount/fc-samp.tex deleted file mode 100644 index f0f0c00b84e..00000000000 --- a/Master/texmf-dist/doc/latex/fmtcount/fc-samp.tex +++ /dev/null @@ -1,103 +0,0 @@ - % This file is public domain -\documentclass[a4paper]{article} - -\usepackage{fmtcount} -% FCloadlang -\newcounter{N} - -\padzeroes[5] - -\newcommand{\printrow}[1]{% - \newline - \setcounter{N}{#1} - \makebox[0.75in][r]{\decimal{N}\quad} - \makebox[0.75in][r]{\hexadecimal{N}\quad} - \makebox[0.75in][r]{\ordinal{N}\quad} - \makebox[2in][l]{\numberstring{N}} -} - -\renewcommand{\thesection}{\ordinal{section}} - -\begin{document} - -\section{Displaying the value of a counter} -\label{ex} - -\begin{ttfamily} -\noindent -\makebox[0.75in][c]{decimal} -\makebox[0.75in][c]{hexadecimal} -\makebox[0.75in][c]{ordinal} -numberstring -\printrow{0} -\printrow{1} -\printrow{2} -\printrow{3} -\printrow{4} -\printrow{5} -\printrow{6} -\printrow{7} -\printrow{8} -\printrow{9} -\printrow{10} -\printrow{11} -\printrow{12} -\printrow{13} -\printrow{14} -\printrow{15} -\printrow{16} -\printrow{17} -\printrow{18} -\printrow{19} -\printrow{20} -\printrow{21} -\printrow{22} -\printrow{23} -\printrow{24} -\printrow{25} -\printrow{30} -\printrow{40} -\printrow{50} -\printrow{60} -\printrow{70} -\printrow{71} -\printrow{75} -\printrow{80} -\printrow{81} -\printrow{85} -\printrow{90} -\printrow{91} -\printrow{95} -\printrow{100} -\printrow{101} -\printrow{110} -\printrow{125} -\printrow{150} -\printrow{170} -\printrow{180} -\printrow{190} -\printrow{200} -\printrow{250} -\printrow{300} -\printrow{400} -\printrow{500} -\printrow{600} -\printrow{700} -\printrow{800} -\printrow{900} -\printrow{1000} -\printrow{99999} -\end{ttfamily} - -\section{Cross-Referencing} - -Referencing a label: \ref{ex}. - -Passing numbers explicitly: -\ordinalnum{10}, -\Numberstringnum{10}, -\NUMBERstringnum{10}, -\Ordinalstringnum{10}, -\ORDINALstringnum{10}. - -\end{document} diff --git a/Master/texmf-dist/doc/latex/fmtcount/fmtcount.pdf b/Master/texmf-dist/doc/latex/fmtcount/fmtcount.pdf Binary files differindex 9bc1c9296e0..162b388d536 100644 --- a/Master/texmf-dist/doc/latex/fmtcount/fmtcount.pdf +++ b/Master/texmf-dist/doc/latex/fmtcount/fmtcount.pdf diff --git a/Master/texmf-dist/source/latex/fmtcount/fmtcount.dtx b/Master/texmf-dist/source/latex/fmtcount/fmtcount.dtx index 9293bdd287d..b4cbc52a536 100644 --- a/Master/texmf-dist/source/latex/fmtcount/fmtcount.dtx +++ b/Master/texmf-dist/source/latex/fmtcount/fmtcount.dtx @@ -5,7 +5,7 @@ % -doc "fmtcount-manual.tex" % -author "Nicola Talbot and Vincent Belaïche" % fmtcount -% Created on 2015/5/8 16:50 +% Created on 2017/6/15 19:28 %\fi %\iffalse %<*package> @@ -28,7 +28,7 @@ %\fi % \iffalse % Doc-Source file to use with LaTeX2e -% Copyright (C) 2015 Nicola Talbot and Vincent Belaïche, all rights reserved. +% Copyright (C) 2017 Nicola Talbot and Vincent Belaïche, all rights reserved. % \fi % \iffalse %<*driver> @@ -49,20 +49,19 @@ \newcommand*{\LanguagePackageOptionList}{{% \def\@tempf##1{\texttt{##1}}% how to format each option % we don't use \cs{newtoks} because anyway this is within a group - \toks0{}% - \def\@tempd{\toks0}% token in which we accumulate result - \def\@tempc{\toks1}% token in which we place next dialect + \toks0{}% token in which we accumulate result + % \toks1 token in which we place next dialect \count0 0 % to distinguish first and second iteration, we need to do tricks because we want to insert `and' % before the last item in the list. \def\@tempb##1{% \ifnum\count0=0 % \else\ifnum\count0=1 % - \expandafter\@tempd\expandafter{\the\toks1}% + \toks0\toks1 % \else \edef\@tempa{\the\toks0, \the\toks1}% - \expandafter\@tempd\expandafter{\@tempa}% + \toks0\expandafter{\@tempa}% \fi\fi - \expandafter\@tempc\expandafter{\@tempf{##1}}% + \toks1\expandafter{\@tempf{##1}}% \advance\count0 by 1 % }% \fc@iterate@on@languages\@tempb @@ -78,11 +77,19 @@ pdftitle={fmtcount.sty: Displaying the Values of LaTeX Counters}, pdfkeywords={LaTeX,counter}]{hyperref} -\CheckSum{9930} +\CheckSum{10157} \doxitem{Option}{option}{options} \newlength{\tabcolwidth} +\newlength{\coliwidth} +\newcommand*\cnab{\centering\arraybackslash} +\newcommand*\ColIRI[1]{} +\csname @ifpackageloaded\endcsname{tex4ht}{% +\newcommand*\ColIRII[1]{\parbox{\coliwidth}{\cnab #1}} +}{% +\newcommand*\ColIRII[1]{\multirow{-2}{\coliwidth}{\cnab #1}} +} \begin{document} \DocInput{fmtcount.dtx} @@ -97,7 +104,7 @@ % \url{www.dickimaw-books.com} % \and % Vincent Bela\"iche} -% \date{2015-05-05 (version 3.01)\relax +% \date{2016-01-12 (version 3.02)\relax %} % \maketitle % \tableofcontents @@ -712,24 +719,24 @@ %\setlength{\tabcolwidth}{\linewidth} %\addtolength{\tabcolwidth}{-10\tabcolsep} %\addtolength{\tabcolwidth}{-6\arrayrulewidth} +%\setlength{\coliwidth}{0.398\tabcolwidth} +%\addtolength{\coliwidth}{\arrayrulewidth} +%\addtolength{\coliwidth}{2\tabcolsep} %\noindent\begin{tabular*}{\linewidth}{|% % >{\centering\arraybackslash\ttfamily}p{\dimexpr0.204\tabcolwidth-\arrayrulewidth-\doublerulesep}||% % *{4}{>{\centering\arraybackslash\ttfamily}p{0.199\tabcolwidth}|}}\hline % \textrm{\meta{x} dans ``\meta{x} }plural\textrm{''}&traditional&reformed&traditional o&reformed o\\\hline % \hline -% vingt&\multicolumn{2}{c|}{}&\multicolumn{2}{c|}{}\\\cline{1-1} +% vingt&\multicolumn{2}{c|}{\ColIRI{multiple l-last}}&\multicolumn{2}{c|}{\ColIRI{multiple lng-last}}\\\cline{1-1} % cent&% -% \multicolumn{2}{c|}{\multirow{-2}{\dimexpr0.398\tabcolwidth+\arrayrulewidth+2\tabcolsep}{\centering -% multiple l-last}}&% -% \multicolumn{2}{c|}{\multirow{-2}{\dimexpr0.398\tabcolwidth+\arrayrulewidth+2\tabcolsep}{\centering -% multiple lng-last}}\\\hline +% \multicolumn{2}{c|}{\ColIRII{multiple l-last}}&% +% \multicolumn{2}{c|}{\ColIRII{multiple lng-last}}\\\hline % mil&\multicolumn{4}{c|}{always}\\\hline -% n-illion&\multicolumn{2}{c|}{}&\multicolumn{2}{c|}{}\\\cline{1-1} +% n-illion&\multicolumn{2}{c|}{\ColIRI{multiple}}&% +% \multicolumn{2}{c|}{\ColIRI{multiple ng-last}}\\\cline{1-1} % n-illiard&% -% \multicolumn{2}{c|}{\multirow{-2}{\dimexpr0.398\tabcolwidth+\arrayrulewidth+2\tabcolsep}{\centering -% multiple}}&% -% \multicolumn{2}{c|}{\multirow{-2}{\dimexpr0.398\tabcolwidth+\arrayrulewidth+2\tabcolsep}{\centering -% multiple ng-last}}\\\hline +% \multicolumn{2}{c|}{\ColIRII{multiple}}&% +% \multicolumn{2}{c|}{\ColIRII{multiple ng-last}}\\\hline %\end{tabular*} % %Les configurations qui respectent les règles d'orthographe sont les suivantes~: @@ -889,17 +896,18 @@ %<*fc-american.def> % \end{macrocode} %\fi +% \subsection{Language definition files} % \subsubsection{fc-american.def} % American English definitions % \begin{macrocode} -\ProvidesFCLanguage{american}[2013/08/17]% +\ProvidesFCLanguage{american}[2016/01/12]% % \end{macrocode} % Loaded fc-USenglish.def if not already loaded % \begin{macrocode} \FCloadlang{USenglish}% % \end{macrocode} % These are all just synonyms for the commands provided by -% fc-USenglish.def. +% \styfmt{fc-USenglish.def}. % \begin{macrocode} \global\let\@ordinalMamerican\@ordinalMUSenglish \global\let\@ordinalFamerican\@ordinalMUSenglish @@ -917,6 +925,9 @@ \global\let\@OrdinalstringFamerican\@OrdinalstringMUSenglish \global\let\@OrdinalstringNamerican\@OrdinalstringMUSenglish % \end{macrocode} +\iffalse Local variables: \fi +\iffalse mode: docTeX \fi +\iffalse End: \fi %\iffalse % \begin{macrocode} %</fc-american.def> @@ -968,7 +979,7 @@ % \subsubsection{fc-english.def} % English definitions % \begin{macrocode} -\ProvidesFCLanguage{english}[2013/08/17]% +\ProvidesFCLanguage{english}[2016/01/12]% % \end{macrocode} % Define macro that converts a number or count register (first % argument) to an ordinal, and stores the result in the @@ -1213,10 +1224,15 @@ this number}% }% \global\let\@@numberstringenglish\@@numberstringenglish % \end{macrocode} -% All lower case version, the second argument must be a -% control sequence. +% All lower case version, the second argument must be a control +% sequence.% +% \changes{3.02}{2016/01/12}{Replace \cs{DeclareRobustCommand} by +% \cs{newcommand*} as robustness is handled now at top level in +% \texttt{fmtcount.sty}, and we don't need \cs{long} macros. Concerned +% macros are \cs{@numberstringMenglish}, \cs{@ordinalstringMenglish}, +% and \cs{@OrdinalstringMenglish}} % \begin{macrocode} -\DeclareRobustCommand{\@numberstringMenglish}[2]{% +\newcommand*{\@numberstringMenglish}[2]{% \let\@unitstring=\@@unitstringenglish \let\@teenstring=\@@teenstringenglish \let\@tenstring=\@@tenstringenglish @@ -1485,7 +1501,7 @@ this number}% % All lower case version. Again, the second argument must be a % control sequence in which the resulting text is stored. % \begin{macrocode} -\DeclareRobustCommand{\@ordinalstringMenglish}[2]{% +\newcommand*{\@ordinalstringMenglish}[2]{% \let\@unitthstring=\@@unitthstringenglish \let\@teenthstring=\@@teenthstringenglish \let\@tenthstring=\@@tenthstringenglish @@ -1507,7 +1523,7 @@ this number}% % \end{macrocode} % First letter of each word in upper case: % \begin{macrocode} -\DeclareRobustCommand{\@OrdinalstringMenglish}[2]{% +\newcommand*{\@OrdinalstringMenglish}[2]{% \let\@unitthstring=\@@Unitthstringenglish \let\@teenthstring=\@@Teenthstringenglish \let\@tenthstring=\@@Tenthstringenglish @@ -1527,6 +1543,9 @@ this number}% \global\let\@OrdinalstringFenglish=\@OrdinalstringMenglish \global\let\@OrdinalstringNenglish=\@OrdinalstringMenglish % \end{macrocode} +\iffalse Local variables: \fi +\iffalse mode: docTeX \fi +\iffalse End: \fi %\iffalse % \begin{macrocode} %</fc-english.def> @@ -1574,12 +1593,37 @@ this number}% % \subsubsection{fc-french.def} % Definitions for French. % \begin{macrocode} -\ProvidesFCLanguage{french}[2012/10/24]% +\ProvidesFCLanguage{french}[2017/06/15]% +% \end{macrocode} +% Package \styfmt{fcprefix} is needed to format the prefix \meta{$n$} +% in \meta{$n$}illion or \meta{$n$}illiard. Big numbers were +% developped based on reference: \uref +% {http://www.alain.be/boece/noms\_de\_nombre.html}. Package \styfmt +% {fcprefix} is now loaded by \styfmt{fmtcount}. +% +% First of all we define two macros \cs{fc@gl@let} and \cs{fc@gl@def} +% used in place of \cs{let} and \cs{def} within options setting +% macros. This way we can control from outside these macros whether +% the respective \cs{let} or \cs{def} is group-local or global. By +% default they are defined to be group-local. +% \changes{3.02}{2016/01/12}{First of all, make command definitions, as well as +% options initial setting global. That is mainly a matter of: +% \protect\begin{itemize} +% \protect\item using \cs{gdef} instead of \cs{def}, +% \protect\item using \cs{global}\cs{let} instead of \cs{let}, and +% \protect\item following \cs{newcommand*}\cs{\meta{foo}} by \cs{global}\cs{let}\cs{\meta{foo}}\cs{\meta{foo}}. +% \protect\item using \cs{fc@gl@let} and \cs{fc@gl@def} in place of \cs{let} +% \protect\item and \cs{def} within options setting macros in order to make intial +% \protect\item setting global. +% \protect\end{itemize} +% Second, replace any \cs{DeclareRobustCommand} by \cs{newcommand*} +% } +% \begin{macrocode} +\ifcsundef{fc@gl@let}{\global\let\fc@gl@let\let}{\PackageError{fmtcount}{Command already defined}{Command +\protect\fc@gl@let\space already defined.}} +\ifcsundef{fc@gl@def}{\global\let\fc@gl@def\def}{\PackageError{fmtcount}{Command already defined}{Command +\protect\fc@gl@def\space already defined.}} % \end{macrocode} -% Package \styfmt{fcprefix} is needed to format the prefix \meta{$n$} in \meta{$n$}illion or -% \meta{$n$}illiard. Big numbers were developped based on reference: -% \uref{http://www.alain.be/boece/noms\_de\_nombre.html} -% (Package now loaded by \styfmt{fmtcount}) % % Options for controlling plural mark. First of all we define some temporary macro \cs{fc@french@set@plural} % in order to factorize code that defines an plural mark option:\newline\noindent @@ -1592,45 +1636,45 @@ this number}% % \#6&configuration index for `\texttt{traditional o}'. % \end{tabularx} % \begin{macrocode} -\def\fc@french@set@plural#1#2#3#4#5#6{% +\gdef\fc@french@set@plural#1#2#3#4#5#6{% \ifthenelse{\equal{#2}{reformed}}{% - \expandafter\def\csname fc@frenchoptions@#1@plural\endcsname{#3}% + \expandafter\fc@gl@def\csname fc@frenchoptions@#1@plural\endcsname{#3}% }{% \ifthenelse{\equal{#2}{traditional}}{% - \expandafter\def\csname fc@frenchoptions@#1@plural\endcsname{#4}% + \expandafter\fc@gl@def\csname fc@frenchoptions@#1@plural\endcsname{#4}% }{% \ifthenelse{\equal{#2}{reformed o}}{% - \expandafter\def\csname fc@frenchoptions@#1@plural\endcsname{#5}% + \expandafter\fc@gl@def\csname fc@frenchoptions@#1@plural\endcsname{#5}% }{% \ifthenelse{\equal{#2}{traditional o}}{% - \expandafter\def\csname fc@frenchoptions@#1@plural\endcsname{#6}% + \expandafter\fc@gl@def\csname fc@frenchoptions@#1@plural\endcsname{#6}% }{% \ifthenelse{\equal{#2}{always}}{% - \expandafter\def\csname fc@frenchoptions@#1@plural\endcsname{0}% + \expandafter\fc@gl@def\csname fc@frenchoptions@#1@plural\endcsname{0}% }{% \ifthenelse{\equal{#2}{never}}{% - \expandafter\def\csname fc@frenchoptions@#1@plural\endcsname{1}% + \expandafter\fc@gl@def\csname fc@frenchoptions@#1@plural\endcsname{1}% }{% \ifthenelse{\equal{#2}{multiple}}{% - \expandafter\def\csname fc@frenchoptions@#1@plural\endcsname{2}% + \expandafter\fc@gl@def\csname fc@frenchoptions@#1@plural\endcsname{2}% }{% \ifthenelse{\equal{#2}{multiple g-last}}{% - \expandafter\def\csname fc@frenchoptions@#1@plural\endcsname{3}% + \expandafter\fc@gl@def\csname fc@frenchoptions@#1@plural\endcsname{3}% }{% \ifthenelse{\equal{#2}{multiple l-last}}{% - \expandafter\def\csname fc@frenchoptions@#1@plural\endcsname{4}% + \expandafter\fc@gl@def\csname fc@frenchoptions@#1@plural\endcsname{4}% }{% \ifthenelse{\equal{#2}{multiple lng-last}}{% - \expandafter\def\csname fc@frenchoptions@#1@plural\endcsname{5}% + \expandafter\fc@gl@def\csname fc@frenchoptions@#1@plural\endcsname{5}% }{% \ifthenelse{\equal{#2}{multiple ng-last}}{% - \expandafter\def\csname fc@frenchoptions@#1@plural\endcsname{6}% + \expandafter\fc@gl@def\csname fc@frenchoptions@#1@plural\endcsname{6}% }{% \PackageError{fmtcount}{Unexpected argument}{% `#2' was unexpected: french option `#1 plural' expects `reformed', `traditional', `reformed o', `traditional o', `always', `never', `multiple', `multiple g-last', `multiple l-last', `multiple lng-last', or `multiple ng-last'.% - }}}}}}}}}}}}} + }}}}}}}}}}}}}% % \end{macrocode} % Now a shorthand \cs{@tempa} is defined just to define all the options controlling plural mark. This % shorthand takes into account that `\texttt{reformed}' and `\texttt{traditional}' have the same effect, and @@ -1640,7 +1684,17 @@ this number}% \define@key{fcfrench}{#1 plural}[reformed]{% \fc@french@set@plural{#1}{##1}{#2}{#2}{#3}{#3}% }% -} +% \end{macrocode} +% Macro \cs{@tempb} takes a macro as argument, and makes its current +% definition global. Like here it is useful when the macro name +% contains non-letters, and we have to resort to the +% \cs{csname}\ldots\cs{endcsname} construct. +% \begin{macrocode} + \expandafter\@tempb\csname KV@fcfrench@#1 plural\endcsname +}% +\def\@tempb#1{% + \global\let#1#1 +}% \@tempa{vingt}{4}{5} \@tempa{cent}{4}{5} \@tempa{mil}{0}{0} @@ -1656,7 +1710,8 @@ this number}% \csname KV@fcfrench@mil plural\endcsname{#1}% \csname KV@fcfrench@n-illion plural\endcsname{#1}% \csname KV@fcfrench@n-illiard plural\endcsname{#1}% -} +}% +\expandafter\@tempb\csname KV@fcfrench@all plural\endcsname % \end{macrocode} % Now options `\texttt{dash or space}', we have three possible key values:\newline\noindent % \begin{tabularx}{\linewidth}{@{}>{\raggedleft\arraybackslash\ttfamily}rX@{}} @@ -1685,7 +1740,7 @@ this number}% }% }% }% -} +}% % \end{macrocode} % Option `\texttt{scale}', can take 3 possible values:\newline\noindent % \begin{tabularx}{\linewidth}{@{}>{\raggedleft\arraybackslash\ttfamily}rX@{}} @@ -1712,7 +1767,7 @@ this number}% }% }% }% -} +}% % \end{macrocode} % Option `\texttt{n-illiard upto}' is ignored if `\texttt{scale}' is different from `\texttt{long}'. It can % take the following values:\newline\noindent @@ -1737,7 +1792,7 @@ this number}% \fi \def\fc@longscale@nilliard@upto{#1}% }}% -} +}% % \end{macrocode} % Now, the options `\texttt{france}', `\texttt{swiss}' and `\texttt{belgian}' are defined to select the % dialect to use. Macro \cs{@tempa} is just a local shorthand to define each one of this option. @@ -1746,15 +1801,15 @@ this number}% \define@key{fcfrench}{#1}[]{% \PackageError{fmtcount}{Unexpected argument}{French option with key `#1' does not take any value}}% - \expandafter\def\csname KV@fcfrench@#1@default\endcsname{% - \def\fmtcount@french{#1}}% + \csgdef{KV@fcfrench@#1@default}{% + \fc@gl@def\fmtcount@french{#1}}% }% \@tempa{france}\@tempa{swiss}\@tempa{belgian}% % \end{macrocode} % Make `\texttt{france}' the default dialect for `\texttt{french}' language % \changes{3.01}{2014-12-18}{Move French specific stuff from \styfmt{fmtcount.sty} to \styfmt{fc-french.def}.} % \begin{macrocode} -\def\fmtcount@french{france}% +\gdef\fmtcount@french{france}% % \end{macrocode} % Now, option `\texttt{dialect}' is now defined so that `\texttt{france}', `\texttt{swiss}' and % `\texttt{belgian}' can also be used as key values, which is more conventional although less concise. @@ -1766,29 +1821,61 @@ this number}% \def\fmtcount@french{#1}}{% \PackageError{fmtcount}{Invalid value `#1' to french option dialect key} {Option `french' can only take the values `france', - `belgian' or `swiss'}}} + `belgian' or `swiss'}}}% +\expandafter\@tempb\csname KV@fcfrench@dialect\endcsname % \end{macrocode} % The option \texttt{mil plural mark} allows to make the plural of \texttt{mil} to be regular, % i.e. \texttt{mils}, instead of \texttt{mille}. By default it is `\texttt{le}'. % \begin{macrocode} \define@key{fcfrench}{mil plural mark}[le]{% \def\fc@frenchoptions@mil@plural@mark{#1}} +\expandafter\@tempb\csname KV@fcfrench@mil plural mark\endcsname % \end{macrocode} % Definition of case handling macros. This should be moved somewhere else to be commonalized between all -% languages. +% languages.\newline +% \DescribeMacro{\fc@UpperCaseFirstLetter}The macro \cs{fc@UpperCaseFirstLetter} is such that +% \cs{fc@UpperCaseFirstLetter}\meta{word}\cs{@nil} expands to \cs{word} with first letter capitalized and +% remainder unchanged. % \begin{macrocode} -\def\fc@UpperCaseFirstLetter#1#2\@nil{% +\gdef\fc@UpperCaseFirstLetter#1#2\@nil{% \uppercase{#1}#2} - -\def\fc@CaseIden#1\@nil{% +% \end{macrocode} +% \DescribeMacro{\fc@CaseIden}The macro \cs{fc@CaseIden} is such that \cs{fc@CaseIden}\meta{word}\cs{@nil} +% expands to \cs{word} unchanged. +% \begin{macrocode} +\gdef\fc@CaseIden#1\@nil{% #1% -} -\def\fc@UpperCaseAll#1\@nil{% +}% +% \end{macrocode} +% \DescribeMacro{\fc@UpperCaseAll}The macro \cs{fc@UpperCaseAll} is such that \cs{fc@UpperCaseAll}\meta{word}\cs{@nil} +% expands to \cs{word} all capitalized. +% \begin{macrocode} +\gdef\fc@UpperCaseAll#1\@nil{% \uppercase{#1}% +}% +% \end{macrocode} +% \DescribeMacro{\fc@wcase}The macro \cs{fc@wcase} is the capitalizing macro for word-by-word +% capitalization. By default we set it to identity, ie.\ no capitalization. +% \begin{macrocode} +\global\let\fc@wcase\fc@CaseIden +% \end{macrocode} +% \DescribeMacro{\fc@gcase}The macro \cs{fc@gcase} is the capitalizing macro for global (the completed number) +% capitalization. By default we set it to identity, ie.\ no capitalization. +% \changes{3.02}{2017/06/15}{Create new macro \cs{fc@gcase} for solving +% \uref{http://github.com/nlct/fmtcount/issues/24}{Issue \#24} about capitalization in French.} +% \begin{macrocode} +\global\let\fc@gcase\fc@CaseIden +% \end{macrocode} +% \DescribeMacro{\fc@apply@gcase}The macro \cs{fc@apply@gcase} simply applies \cs{fc@gcase} to \cs{@tempa}, +% knowing that \cs{@tempa} is the macro containing the result of formatting. +% \begin{macrocode} +\gdef\fc@apply@gcase{% +% \end{macrocode} +% First of all we expand whatever \cs{fc@wcase}\ldots\cs{@nil} found within \cs{@tempa}. +% \begin{macrocode} + \protected@edef\@tempa{\@tempa}% + \protected@edef\@tempa{\expandafter\fc@gcase\@tempa\@nil}% } - -\let\fc@case\fc@CaseIden - % \end{macrocode} % \DescribeMacro{\@ordinalMfrench} % \changes{3.01}{2014-11-12}{Protect \cs{`}, for solving @@ -1814,6 +1901,7 @@ this number}% \protected@edef#2{\number#1\relax\noexpand\fmtord{\protect\`eme}}% \fi \fi} +\global\let\@ordinalMfrench\@ordinalMfrench % \end{macrocode} % \DescribeMacro{\@ordinalFfrench} % \changes{3.01}{2014-11-10}{Protect \cs{`}, for solving @@ -1838,15 +1926,16 @@ this number}% \protected@edef#2{\number#1\relax\noexpand\fmtord{\protect\`eme}}% \fi \fi} +\global\let\@ordinalFfrench\@ordinalFfrench % \end{macrocode} % In French neutral gender and masculine gender are formally identical. % \begin{macrocode} -\let\@ordinalNfrench\@ordinalMfrench +\global\let\@ordinalNfrench\@ordinalMfrench % \end{macrocode} % \DescribeMacro{\@@unitstringfrench} % \begin{macrocode} \newcommand*{\@@unitstringfrench}[1]{% -\noexpand\fc@case +\noexpand\fc@wcase \ifcase#1 % z\'ero% \or un% @@ -1860,12 +1949,13 @@ z\'ero% \or neuf% \fi \noexpand\@nil -} +}% +\global\let\@@unitstringfrench\@@unitstringfrench % \end{macrocode} % \DescribeMacro{\@@tenstringfrench} % \begin{macrocode} \newcommand*{\@@tenstringfrench}[1]{% -\noexpand\fc@case +\noexpand\fc@wcase \ifcase#1 % \or dix% \or vingt% @@ -1879,12 +1969,13 @@ z\'ero% \or cent% \fi \noexpand\@nil -} +}% +\global\let\@@tenstringfrench\@@tenstringfrench % \end{macrocode} % \DescribeMacro{\@@teenstringfrench} % \begin{macrocode} \newcommand*{\@@teenstringfrench}[1]{% -\noexpand\fc@case +\noexpand\fc@wcase \ifcase#1 % dix% \or onze% @@ -1893,12 +1984,13 @@ z\'ero% \or quatorze% \or quinze% \or seize% -\or dix\noexpand\@nil-\noexpand\fc@case sept% -\or dix\noexpand\@nil-\noexpand\fc@case huit% -\or dix\noexpand\@nil-\noexpand\fc@case neuf% +\or dix\noexpand\@nil-\noexpand\fc@wcase sept% +\or dix\noexpand\@nil-\noexpand\fc@wcase huit% +\or dix\noexpand\@nil-\noexpand\fc@wcase neuf% \fi \noexpand\@nil -} +}% +\global\let\@@teenstringfrench\@@teenstringfrench % \end{macrocode} % \DescribeMacro{\@@seventiesfrench} % \begin{macrocode} @@ -1910,7 +2002,8 @@ z\'ero% -% \fi \@teenstring{#1}% -} +}% +\global\let\@@seventiesfrench\@@seventiesfrench % \end{macrocode} % \DescribeMacro{\@@eightiesfrench}Macro \cs{@@eightiesfrench} is used to format numbers in the interval % \([80\intv 89]\). Argument as follows:\newline @@ -1928,7 +2021,7 @@ z\'ero% % \end{tabularx} % \begin{macrocode} \newcommand*\@@eightiesfrench[1]{% -\fc@case quatre\@nil-\noexpand\fc@case vingt% +\fc@wcase quatre\@nil-\noexpand\fc@wcase vingt% \ifnum#1>0 % \ifnum\fc@frenchoptions@vingt@plural=0 % vingt plural=always s% @@ -1967,279 +2060,312 @@ z\'ero% \fi \noexpand\@nil \fi -} +}% +\global\let\@@eightiesfrench\@@eightiesfrench \newcommand*{\@@ninetiesfrench}[1]{% -\fc@case quatre\@nil-\noexpand\fc@case vingt% +\fc@wcase quatre\@nil-\noexpand\fc@wcase vingt% \ifnum\fc@frenchoptions@vingt@plural=0 % vingt plural=always s% \fi \noexpand\@nil -\@teenstring{#1}% -} +}% +\global\let\@@ninetiesfrench\@@ninetiesfrench \newcommand*{\@@seventiesfrenchswiss}[1]{% \@tenstring{7}% \ifnum#1=1\ \@andname\ \fi \ifnum#1>1-\fi \ifnum#1>0 \@unitstring{#1}\fi -} +}% +\global\let\@@seventiesfrenchswiss\@@seventiesfrenchswiss \newcommand*{\@@eightiesfrenchswiss}[1]{% \@tenstring{8}% \ifnum#1=1\ \@andname\ \fi \ifnum#1>1-\fi \ifnum#1>0 \@unitstring{#1}\fi -} +}% +\global\let\@@eightiesfrenchswiss\@@eightiesfrenchswiss \newcommand*{\@@ninetiesfrenchswiss}[1]{% \@tenstring{9}% \ifnum#1=1\ \@andname\ \fi \ifnum#1>1-\fi \ifnum#1>0 \@unitstring{#1}\fi -} +}% +\global\let\@@ninetiesfrenchswiss\@@ninetiesfrenchswiss % \end{macrocode} % \DescribeMacro{\fc@french@common}Macro \cs{fc@french@common} does all the preliminary settings common to all % French dialects \& formatting options. % \begin{macrocode} \newcommand*\fc@french@common{% + \let\fc@wcase\fc@CaseIden \let\@unitstring=\@@unitstringfrench \let\@teenstring=\@@teenstringfrench \let\@tenstring=\@@tenstringfrench \def\@hundred{cent}% \def\@andname{et}% -} +}% +\global\let\fc@french@common\fc@french@common % \end{macrocode} % \begin{macrocode} -\DeclareRobustCommand{\@numberstringMfrenchswiss}[2]{% -\let\fc@case\fc@CaseIden +\newcommand*{\@numberstringMfrenchswiss}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrenchswiss \let\@nineties=\@@ninetiesfrenchswiss \let\fc@nbrstr@preamble\@empty \let\fc@nbrstr@postamble\@empty \@@numberstringfrench{#1}{#2}} -\DeclareRobustCommand{\@numberstringMfrenchfrance}[2]{% -\let\fc@case\fc@CaseIden +\global\let\@numberstringMfrenchswiss\@numberstringMfrenchswiss +\newcommand*{\@numberstringMfrenchfrance}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \let\fc@nbrstr@preamble\@empty \let\fc@nbrstr@postamble\@empty \@@numberstringfrench{#1}{#2}} -\DeclareRobustCommand{\@numberstringMfrenchbelgian}[2]{% -\let\fc@case\fc@CaseIden +\global\let\@numberstringMfrenchfrance\@numberstringMfrenchfrance +\newcommand*{\@numberstringMfrenchbelgian}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \let\fc@nbrstr@preamble\@empty \let\fc@nbrstr@postamble\@empty \@@numberstringfrench{#1}{#2}} +\global\let\@numberstringMfrenchbelgian\@numberstringMfrenchbelgian \let\@numberstringMfrench=\@numberstringMfrenchfrance -\DeclareRobustCommand{\@numberstringFfrenchswiss}[2]{% -\let\fc@case\fc@CaseIden +\newcommand*{\@numberstringFfrenchswiss}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrenchswiss \let\@nineties=\@@ninetiesfrenchswiss \let\fc@nbrstr@preamble\fc@@nbrstr@Fpreamble \let\fc@nbrstr@postamble\@empty \@@numberstringfrench{#1}{#2}} -\DeclareRobustCommand{\@numberstringFfrenchfrance}[2]{% -\let\fc@case\fc@CaseIden +\global\let\@numberstringFfrenchswiss\@numberstringFfrenchswiss +\newcommand*{\@numberstringFfrenchfrance}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \let\fc@nbrstr@preamble\fc@@nbrstr@Fpreamble \let\fc@nbrstr@postamble\@empty \@@numberstringfrench{#1}{#2}} -\DeclareRobustCommand{\@numberstringFfrenchbelgian}[2]{% -\let\fc@case\fc@CaseIden +\global\let\@numberstringFfrenchfrance\@numberstringFfrenchfrance +\newcommand*{\@numberstringFfrenchbelgian}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \let\fc@nbrstr@preamble\fc@@nbrstr@Fpreamble \let\fc@nbrstr@postamble\@empty \@@numberstringfrench{#1}{#2}} -\let\@numberstringFfrench=\@numberstringFfrenchfrance -\let\@ordinalstringNfrench\@ordinalstringMfrench -\DeclareRobustCommand{\@NumberstringMfrenchswiss}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter +\global\let\@numberstringFfrenchbelgian\@numberstringFfrenchbelgian +\global\let\@numberstringFfrench=\@numberstringFfrenchfrance +\global\let\@ordinalstringNfrench\@ordinalstringMfrench +\newcommand*{\@NumberstringMfrenchswiss}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrenchswiss \let\@nineties=\@@ninetiesfrenchswiss \let\fc@nbrstr@preamble\@empty -\let\fc@nbrstr@postamble\@empty +\let\fc@nbrstr@postamble\fc@apply@gcase \@@numberstringfrench{#1}{#2}} -\DeclareRobustCommand{\@NumberstringMfrenchfrance}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter +\global\let\@NumberstringMfrenchswiss\@NumberstringMfrenchswiss +\newcommand*{\@NumberstringMfrenchfrance}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \let\fc@nbrstr@preamble\@empty -\let\fc@nbrstr@postamble\@empty +\let\fc@nbrstr@postamble\fc@apply@gcase \@@numberstringfrench{#1}{#2}} -\DeclareRobustCommand{\@NumberstringMfrenchbelgian}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter +\global\let\@NumberstringMfrenchfrance\@NumberstringMfrenchfrance +\newcommand*{\@NumberstringMfrenchbelgian}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \let\fc@nbrstr@preamble\@empty -\let\fc@nbrstr@postamble\@empty +\let\fc@nbrstr@postamble\fc@apply@gcase \@@numberstringfrench{#1}{#2}} -\let\@NumberstringMfrench=\@NumberstringMfrenchfrance -\DeclareRobustCommand{\@NumberstringFfrenchswiss}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter +\global\let\@NumberstringMfrenchbelgian\@NumberstringMfrenchbelgian +\global\let\@NumberstringMfrench=\@NumberstringMfrenchfrance +\newcommand*{\@NumberstringFfrenchswiss}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrenchswiss \let\@nineties=\@@ninetiesfrenchswiss \let\fc@nbrstr@preamble\fc@@nbrstr@Fpreamble -\let\fc@nbrstr@postamble\@empty +\let\fc@nbrstr@postamble\fc@apply@gcase \@@numberstringfrench{#1}{#2}} -\DeclareRobustCommand{\@NumberstringFfrenchfrance}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter +\global\let\@NumberstringFfrenchswiss\@NumberstringFfrenchswiss +\newcommand*{\@NumberstringFfrenchfrance}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \let\fc@nbrstr@preamble\fc@@nbrstr@Fpreamble -\let\fc@nbrstr@postamble\@empty +\let\fc@nbrstr@postamble\fc@apply@gcase \@@numberstringfrench{#1}{#2}} -\DeclareRobustCommand{\@NumberstringFfrenchbelgian}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter +\global\let\@NumberstringFfrenchfrance\@NumberstringFfrenchfrance +\newcommand*{\@NumberstringFfrenchbelgian}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \let\fc@nbrstr@preamble\fc@@nbrstr@Fpreamble -\let\fc@nbrstr@postamble\@empty +\let\fc@nbrstr@postamble\fc@apply@gcase \@@numberstringfrench{#1}{#2}} -\let\@NumberstringFfrench=\@NumberstringFfrenchfrance -\let\@NumberstringNfrench\@NumberstringMfrench -\DeclareRobustCommand{\@ordinalstringMfrenchswiss}[2]{% -\let\fc@case\fc@CaseIden -\let\fc@first=\fc@@firstfrench +\global\let\@NumberstringFfrenchbelgian\@NumberstringFfrenchbelgian +\global\let\@NumberstringFfrench=\@NumberstringFfrenchfrance +\global\let\@NumberstringNfrench\@NumberstringMfrench +\newcommand*{\@ordinalstringMfrenchswiss}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden +\let\fc@first\fc@@firstfrench \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrenchswiss \let\@nineties=\@@ninetiesfrenchswiss \@@ordinalstringfrench{#1}{#2}% -} +}% +\global\let\@ordinalstringMfrenchswiss\@ordinalstringMfrenchswiss \newcommand*\fc@@firstfrench{premier} +\global\let\fc@@firstfrench\fc@@firstfrench % \end{macrocode} % \changes{3.01}{2014-11-10}{Protect \cs{`}, for solving % \uref{http://github.com/nlct/fmtcount/issues/15}{Issue \#15}} % \begin{macrocode} \newcommand*\fc@@firstFfrench{premi\protect\`ere} -\DeclareRobustCommand{\@ordinalstringMfrenchfrance}[2]{% -\let\fc@case\fc@CaseIden -\let\fc@first=\fc@@firstfrench +\global\let\fc@@firstFfrench\fc@@firstFfrench +\newcommand*{\@ordinalstringMfrenchfrance}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden +\let\fc@first=\fc@@firstfrench \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \@@ordinalstringfrench{#1}{#2}} -\DeclareRobustCommand{\@ordinalstringMfrenchbelgian}[2]{% -\let\fc@case\fc@CaseIden -\let\fc@first=\fc@@firstfrench +\global\let\@ordinalstringMfrenchfrance\@ordinalstringMfrenchfrance +\newcommand*{\@ordinalstringMfrenchbelgian}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden +\let\fc@first=\fc@@firstfrench \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \@@ordinalstringfrench{#1}{#2}% -} -\let\@ordinalstringMfrench=\@ordinalstringMfrenchfrance -\DeclareRobustCommand{\@ordinalstringFfrenchswiss}[2]{% -\let\fc@case\fc@CaseIden -\let\fc@first=\fc@@firstFfrench +}% +\global\let\@ordinalstringMfrenchbelgian\@ordinalstringMfrenchbelgian +\global\let\@ordinalstringMfrench=\@ordinalstringMfrenchfrance +\newcommand*{\@ordinalstringFfrenchswiss}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden +\let\fc@first\fc@@firstFfrench \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrenchswiss \let\@nineties=\@@ninetiesfrenchswiss \@@ordinalstringfrench{#1}{#2}% -} -\DeclareRobustCommand{\@ordinalstringFfrenchfrance}[2]{% -\let\fc@case\fc@CaseIden -\let\fc@first=\fc@@firstFfrench +}% +\global\let\@ordinalstringFfrenchswiss\@ordinalstringFfrenchswiss +\newcommand*{\@ordinalstringFfrenchfrance}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden +\let\fc@first=\fc@@firstFfrench \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \@@ordinalstringfrench{#1}{#2}% -} -\DeclareRobustCommand{\@ordinalstringFfrenchbelgian}[2]{% -\let\fc@case\fc@CaseIden -\let\fc@first=\fc@@firstFfrench +}% +\global\let\@ordinalstringFfrenchfrance\@ordinalstringFfrenchfrance +\newcommand*{\@ordinalstringFfrenchbelgian}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden +\let\fc@first=\fc@@firstFfrench \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \@@ordinalstringfrench{#1}{#2}% -} -\let\@ordinalstringFfrench=\@ordinalstringFfrenchfrance -\let\@ordinalstringNfrench\@ordinalstringMfrench -\DeclareRobustCommand{\@OrdinalstringMfrenchswiss}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter -\let\fc@first=\fc@@firstfrench +}% +\global\let\@ordinalstringFfrenchbelgian\@ordinalstringFfrenchbelgian +\global\let\@ordinalstringFfrench=\@ordinalstringFfrenchfrance +\global\let\@ordinalstringNfrench\@ordinalstringMfrench +\newcommand*{\@OrdinalstringMfrenchswiss}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter +\let\fc@first=\fc@@firstfrench \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrenchswiss \let\@nineties=\@@ninetiesfrenchswiss \@@ordinalstringfrench{#1}{#2}% -} -\DeclareRobustCommand{\@OrdinalstringMfrenchfrance}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter -\let\fc@first=\fc@@firstfrench +}% +\global\let\@OrdinalstringMfrenchswiss\@OrdinalstringMfrenchswiss +\newcommand*{\@OrdinalstringMfrenchfrance}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter +\let\fc@first\fc@@firstfrench \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \@@ordinalstringfrench{#1}{#2}% -} -\DeclareRobustCommand{\@OrdinalstringMfrenchbelgian}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter -\let\fc@first=\fc@@firstfrench +}% +\global\let\@OrdinalstringMfrenchfrance\@OrdinalstringMfrenchfrance +\newcommand*{\@OrdinalstringMfrenchbelgian}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter +\let\fc@first\fc@@firstfrench \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \@@ordinalstringfrench{#1}{#2}% -} -\let\@OrdinalstringMfrench=\@OrdinalstringMfrenchfrance -\DeclareRobustCommand{\@OrdinalstringFfrenchswiss}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter -\let\fc@first=\fc@@firstfrench +}% +\global\let\@OrdinalstringMfrenchbelgian\@OrdinalstringMfrenchbelgian +\global\let\@OrdinalstringMfrench=\@OrdinalstringMfrenchfrance +\newcommand*{\@OrdinalstringFfrenchswiss}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter +\let\fc@first\fc@@firstfrench \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrenchswiss \let\@nineties=\@@ninetiesfrenchswiss \@@ordinalstringfrench{#1}{#2}% -} -\DeclareRobustCommand{\@OrdinalstringFfrenchfrance}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter -\let\fc@first=\fc@@firstFfrench +}% +\global\let\@OrdinalstringFfrenchswiss\@OrdinalstringFfrenchswiss +\newcommand*{\@OrdinalstringFfrenchfrance}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter +\let\fc@first\fc@@firstFfrench \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \@@ordinalstringfrench{#1}{#2}% -} -\DeclareRobustCommand{\@OrdinalstringFfrenchbelgian}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter -\let\fc@first=\fc@@firstFfrench +}% +\global\let\@OrdinalstringFfrenchfrance\@OrdinalstringFfrenchfrance +\newcommand*{\@OrdinalstringFfrenchbelgian}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter +\let\fc@first\fc@@firstFfrench \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \@@ordinalstringfrench{#1}{#2}% -} -\let\@OrdinalstringFfrench=\@OrdinalstringFfrenchfrance -\let\@OrdinalstringNfrench\@OrdinalstringMfrench +}% +\global\let\@OrdinalstringFfrenchbelgian\@OrdinalstringFfrenchbelgian +\global\let\@OrdinalstringFfrench=\@OrdinalstringFfrenchfrance +\global\let\@OrdinalstringNfrench\@OrdinalstringMfrench % \end{macrocode} % \DescribeMacro{\fc@@do@plural@mark}Macro \cs{fc@@do@plural@mark} will expand to the plural mark of % \meta{$n$}illiard, \meta{$n$}illion, mil, cent or vingt, whichever is applicable. First check that the macro @@ -2301,7 +2427,8 @@ z\'ero% \fi \fi \fi -} +}% +\global\let\fc@@do@plural@mark\fc@@do@plural@mark % \end{macrocode} % \DescribeMacro{\fc@@nbrstr@Fpreamble}Macro \cs{fc@@nbrstr@Fpreamble} do the necessary preliminaries before % formatting a cardinal with feminine gender. @@ -2315,24 +2442,26 @@ z\'ero% \def\fc@@nbrstr@Fpreamble{% \fc@read@unit{\count1}{0}% \ifnum\count1=1 % - \let\fc@case@save\fc@case - \def\fc@case{\noexpand\fc@case}% + \let\fc@wcase@save\fc@wcase + \def\fc@wcase{\noexpand\fc@wcase}% \def\@nil{\noexpand\@nil}% \let\fc@nbrstr@postamble\fc@@nbrstr@Fpostamble \fi -} +}% +\global\let\fc@@nbrstr@Fpreamble\fc@@nbrstr@Fpreamble % \end{macrocode} % \DescribeMacro{\fc@@nbrstr@Fpostamble} % \begin{macrocode} \def\fc@@nbrstr@Fpostamble{% - \let\fc@case\fc@case@save + \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@case une\@nil}% + \edef\@tempa{\@tempb\fc@wcase une\@nil}% \fi -} +}% +\global\let\fc@@nbrstr@Fpostamble\fc@@nbrstr@Fpostamble % \end{macrocode} % \DescribeMacro{\fc@@pot@longscalefrench}Macro \cs{fc@@pot@longscalefrench} is used to produce % powers of ten with long scale convention. The long scale convention is correct for French and elsewhere in @@ -2431,7 +2560,7 @@ z\'ero% % \begin{macrocode} \count10=\fc@frenchoptions@mil@plural\space \edef\@tempe{% - \noexpand\fc@case + \noexpand\fc@wcase mil% \fc@@do@plural@mark\fc@frenchoptions@mil@plural@mark \noexpand\@nil @@ -2448,7 +2577,7 @@ z\'ero% \count10=\csname fc@frenchoptions@n-illion@plural\endcsname\space \fi \edef\@tempe{% - \noexpand\fc@case + \noexpand\fc@wcase \@tempg \the\toks10 % \fc@@do@plural@mark s% @@ -2479,7 +2608,8 @@ z\'ero% \edef\@tempa{\the\toks0 \@temph \def\noexpand#3{\the\toks1}}% \expandafter }\@tempa -} +}% +\global\let\fc@@pot@longscalefrench\fc@@pot@longscalefrench % \end{macrocode} % \DescribeMacro{\fc@@pot@shortscalefrench}Macro \cs{fc@@pot@shortscalefrench} is used to produce % powers of ten with short scale convention. This convention is the US convention and is not correct for @@ -2529,7 +2659,7 @@ z\'ero% \expandafter\fc@@latin@cardinal@pefix\expandafter{\the\count2}\@tempg \count10=\csname fc@frenchoptions@n-illion@plural\endcsname\space \edef\@tempe{% - \noexpand\fc@case + \noexpand\fc@wcase \@tempg illion% \fc@@do@plural@mark s% @@ -2558,7 +2688,8 @@ z\'ero% \edef\@tempa{\the\toks0 \@temph \def\noexpand#3{\the\toks1}}% \expandafter }\@tempa -} +}% +\global\let\fc@@pot@shortscalefrench\fc@@pot@shortscalefrench % \end{macrocode} % \DescribeMacro{\fc@@pot@recursivefrench}Macro \cs{fc@@pot@recursivefrench} is used to produce % power of tens that are of the form ``million de milliards de milliards'' for \(10^{24}\). First we check @@ -2592,7 +2723,7 @@ z\'ero% \advance\count2 by -1 % \let\@tempe\@empty \edef\@tempf{\fc@frenchoptions@supermillion@dos - de\fc@frenchoptions@supermillion@dos\fc@case milliards\@nil}% + de\fc@frenchoptions@supermillion@dos\fc@wcase milliards\@nil}% \count11\count0 % \ifnum\count2>0 % \count3\count2 % @@ -2649,16 +2780,16 @@ z\'ero% \or mil\fc@@do@plural@mark\fc@frenchoptions@mil@plural@mark \noexpand\@nil\fc@frenchoptions@supermillion@dos - \noexpand\fc@case milliards% 4 + \noexpand\fc@wcase milliards% 4 \or million\fc@@do@plural@mark s% \noexpand\@nil\fc@frenchoptions@supermillion@dos - de\fc@frenchoptions@supermillion@dos\noexpand\fc@case milliards% 5 + de\fc@frenchoptions@supermillion@dos\noexpand\fc@wcase milliards% 5 \fi }% \edef\@tempe{% \ifx\@tempf\@empty\else - \expandafter\fc@case\@tempf\@nil + \expandafter\fc@wcase\@tempf\@nil \fi \@tempg }% @@ -2667,7 +2798,7 @@ z\'ero% \let\@tempe\@empty \fi % \end{macrocode} -% now place into \@cs{@tempa} the assignment of results \cs{@temph} and \cs{@tempe} to to \texttt{\#2} and +% Now place into \@cs{@tempa} the assignment of results \cs{@temph} and \cs{@tempe} to \texttt{\#2} and % \texttt{\#3} for further propagation after closing brace. % \begin{macrocode} \expandafter\toks\expandafter1\expandafter{\@tempe}% @@ -2675,7 +2806,8 @@ z\'ero% \edef\@tempa{\the\toks0 \@temph \def\noexpand#3{\the\toks1}}% \expandafter }\@tempa -} +}% +\global\let\fc@@pot@recursivefrench\fc@@pot@recursivefrench % \end{macrocode} % \DescribeMacro{\fc@muladdfrench}Macro \cs{fc@muladdfrench} is used to format the sum of a number \(a\) and % the product of a number \(d\) by a power of ten \(10^w\). Number \(d\) is made of three consecutive digits @@ -2773,6 +2905,7 @@ z\'ero% \expandafter }\@tempa }% +\global\let\fc@muladdfrench\fc@muladdfrench % \end{macrocode} % \DescribeMacro{\fc@lthundredstringfrench}Macro \cs{fc@lthundredstringfrench} is used to format a number in % interval \([0 \intv 99]\). First we check that it is not already defined. @@ -2875,7 +3008,8 @@ z\'ero% \expandafter\@tempb\expandafter{\@tempa}% \expandafter }\@tempa -} +}% +\global\let\fc@lthundredstringfrench\fc@lthundredstringfrench % \end{macrocode} % \DescribeMacro{\fc@ltthousandstringfrench}Macro \cs{fc@ltthousandstringfrench} is used to format a number in % interval \([0 \intv 999]\). First we check that it is not already defined. @@ -2939,10 +3073,10 @@ z\'ero% \ifnum\count2=0 % \else \ifnum\count2=1 % - \expandafter\fc@case\@hundred\@nil + \expandafter\fc@wcase\@hundred\@nil \else \@unitstring{\count2}\fc@frenchoptions@submillion@dos - \noexpand\fc@case\@hundred\@temps\noexpand\@nil + \noexpand\fc@wcase\@hundred\@temps\noexpand\@nil \fi \@tempb \fi @@ -2956,7 +3090,8 @@ z\'ero% \expandafter\@tempb\expandafter{\@tempa}% \expandafter }\@tempa -} +}% +\global\let\fc@ltthousandstringfrench\fc@ltthousandstringfrench % \end{macrocode} % \DescribeMacro{\@@numberstringfrench}Macro \cs{@@numberstringfrench} is the main engine for formatting % cadinal numbers in French. First we check that the control sequence is not yet defined. @@ -2987,7 +3122,7 @@ z\'ero% % \cs{fc@sign@case} expands to `\texttt{0}', then \cs{@tempa} is defined to `' (i.e. empty) rather than to % `\cs{relax}'. % \begin{macrocode} - \edef\@tempa{\ifcase\fc@sign@case\space\or\fc@case plus\@nil\or\fc@case moins\@nil\fi}% + \edef\@tempa{\ifcase\fc@sign@case\space\or\fc@wcase plus\@nil\or\fc@wcase moins\@nil\fi}% \fc@nbrstr@preamble \fc@@nbrstrfrench@inner \fc@nbrstr@postamble @@ -2998,7 +3133,8 @@ z\'ero% \expandafter\@tempb\expandafter{\@tempa}% \expandafter }\@tempa -} +}% +\global\let\@@numberstringfrench\@@numberstringfrench % \end{macrocode} % \DescribeMacro{\fc@@nbrstrfrench@inner}Common part of \cs{@@numberstringfrench} and \cs % {@@ordinalstringfrench}. Arguments are as follows:\newline\noindent @@ -3055,7 +3191,8 @@ z\'ero% \advance\count0 by -3 % \ifnum\count6>\count0 \else \repeat -} +}% +\global\let\fc@@nbrstrfrench@inner\fc@@nbrstrfrench@inner % \end{macrocode} % \DescribeMacro{\@@ordinalstringfrench}Macro \cs{@@ordinalstringfrench} is the main engine for formatting % ordinal numbers in French. First check it is not yet defined. @@ -3103,7 +3240,7 @@ z\'ero% % \changes{3.01}{2014-11-10}{Protect \cs{`}, for solving % \uref{http://github.com/nlct/fmtcount/issues/15}{Issue \#15}} % \begin{macrocode} - \protected@edef\@tempa{\expandafter\fc@case\fc@first\@nil}% + \protected@edef\@tempa{\expandafter\fc@wcase\fc@first\@nil}% \else % \end{macrocode} % Now we tamper a little bit with the plural handling options to ensure that there is no final plural mark. @@ -3133,10 +3270,10 @@ z\'ero% \@tempa{n-illion}% \@tempa{n-illiard}% % \end{macrocode} -% Now make \cs{fc@case} and \cs{@nil} non expandable +% Now make \cs{fc@wcase} and \cs{@nil} non expandable % \begin{macrocode} - \let\fc@case@save\fc@case - \def\fc@case{\noexpand\fc@case}% + \let\fc@wcase@save\fc@wcase + \def\fc@wcase{\noexpand\fc@wcase}% \def\@nil{\noexpand\@nil}% % \end{macrocode} % In the sequel, \cs{@tempa} is used to accumulate the formatted number. @@ -3144,9 +3281,9 @@ z\'ero% \let\@tempa\@empty \fc@@nbrstrfrench@inner % \end{macrocode} -% Now restore \cs{fc@case} +% Now restore \cs{fc@wcase} % \begin{macrocode} - \let\fc@case\fc@case@save + \let\fc@wcase\fc@wcase@save % \end{macrocode} % Now we add the ``i\`eme'' ending % \changes{3.01}{2014-11-10}{Protect \cs{`}, for solving @@ -3156,55 +3293,65 @@ z\'ero% \expandafter\fc@get@last@letter\expandafter{\@tempc}\@tempd\@tempe \def\@tempf{e}% \ifx\@tempe\@tempf - \protected@edef\@tempa{\@tempb\expandafter\fc@case\@tempd i\protect\`eme\@nil}% + \protected@edef\@tempa{\@tempb\expandafter\fc@wcase\@tempd i\protect\`eme\@nil}% \else \def\@tempf{q}% \ifx\@tempe\@tempf - \protected@edef\@tempa{\@tempb\expandafter\fc@case\@tempd qui\protect\`eme\@nil}% + \protected@edef\@tempa{\@tempb\expandafter\fc@wcase\@tempd qui\protect\`eme\@nil}% \else \def\@tempf{f}% \ifx\@tempe\@tempf - \protected@edef\@tempa{\@tempb\expandafter\fc@case\@tempd vi\protect\`eme\@nil}% + \protected@edef\@tempa{\@tempb\expandafter\fc@wcase\@tempd vi\protect\`eme\@nil}% \else - \protected@edef\@tempa{\@tempb\expandafter\fc@case\@tempc i\protect\`eme\@nil}% + \protected@edef\@tempa{\@tempb\expandafter\fc@wcase\@tempc i\protect\`eme\@nil}% \fi \fi \fi \fi % \end{macrocode} +% Apply \cs{fc@gcase} to the result. +% \begin{macrocode} + \fc@apply@gcase +% \end{macrocode} % Propagate the result --- i.e. expansion of \cs{@tempa} --- into macro \texttt{\#2} after closing brace. % \begin{macrocode} \def\@tempb##1{\def\@tempa{\def#2{##1}}}% \expandafter\@tempb\expandafter{\@tempa}% \expandafter }\@tempa -} +}% +\global\let\@@ordinalstringfrench\@@ordinalstringfrench % \end{macrocode} % Macro \cs{fc@frenchoptions@setdefaults} allows to set all options to default for the French. % \begin{macrocode} \newcommand*\fc@frenchoptions@setdefaults{% \csname KV@fcfrench@all plural\endcsname{reformed}% - \def\fc@frenchoptions@submillion@dos{-}% - \let\fc@frenchoptions@supermillion@dos\space - \let\fc@u@in@duo\@empty% Could be `u' - % \let\fc@poweroften\fc@@pot@longscalefrench - \let\fc@poweroften\fc@@pot@recursivefrench - \def\fc@longscale@nilliard@upto{0}% infinity - \def\fc@frenchoptions@mil@plural@mark{le}% -} -\fc@frenchoptions@setdefaults + \fc@gl@def\fc@frenchoptions@submillion@dos{-}% + \fc@gl@let\fc@frenchoptions@supermillion@dos\space + \fc@gl@let\fc@u@in@duo\@empty% Could be `u' + % \fc@gl@let\fc@poweroften\fc@@pot@longscalefrench + \fc@gl@let\fc@poweroften\fc@@pot@recursivefrench + \fc@gl@def\fc@longscale@nilliard@upto{0}% infinity + \fc@gl@def\fc@frenchoptions@mil@plural@mark{le}% +}% +\global\let\fc@frenchoptions@setdefaults\fc@frenchoptions@setdefaults +{% + \let\fc@gl@def\gdef + \def\fc@gl@let{\global\let}% + \fc@frenchoptions@setdefaults +}% % \end{macrocode} % Make some indirection to call the current French dialect corresponding macro. % \changes{3.01}{2014-12-18}{Move French specific stuff from \styfmt{fmtcount.sty} to \styfmt{fc-french.def}.} % \begin{macrocode} -\def\@ordinalstringMfrench{\csuse{@ordinalstringMfrench\fmtcount@french}}% -\def\@ordinalstringFfrench{\csuse{@ordinalstringFfrench\fmtcount@french}}% -\def\@OrdinalstringMfrench{\csuse{@OrdinalstringMfrench\fmtcount@french}}% -\def\@OrdinalstringFfrench{\csuse{@OrdinalstringFfrench\fmtcount@french}}% -\def\@numberstringMfrench{\csuse{@numberstringMfrench\fmtcount@french}}% -\def\@numberstringFfrench{\csuse{@numberstringFfrench\fmtcount@french}}% -\def\@NumberstringMfrench{\csuse{@NumberstringMfrench\fmtcount@french}}% -\def\@NumberstringFfrench{\csuse{@NumberstringFfrench\fmtcount@french}}% +\gdef\@ordinalstringMfrench{\csuse{@ordinalstringMfrench\fmtcount@french}}% +\gdef\@ordinalstringFfrench{\csuse{@ordinalstringFfrench\fmtcount@french}}% +\gdef\@OrdinalstringMfrench{\csuse{@OrdinalstringMfrench\fmtcount@french}}% +\gdef\@OrdinalstringFfrench{\csuse{@OrdinalstringFfrench\fmtcount@french}}% +\gdef\@numberstringMfrench{\csuse{@numberstringMfrench\fmtcount@french}}% +\gdef\@numberstringFfrench{\csuse{@numberstringFfrench\fmtcount@french}}% +\gdef\@NumberstringMfrench{\csuse{@NumberstringMfrench\fmtcount@french}}% +\gdef\@NumberstringFfrench{\csuse{@NumberstringFfrench\fmtcount@french}}% % \end{macrocode} \iffalse Local variables: \fi \iffalse mode: docTeX \fi @@ -3257,7 +3404,7 @@ z\'ero% % German definitions (thank you to K. H. Fricke for supplying % this information) % \begin{macrocode} -\ProvidesFCLanguage{german}[2014/06/09]% +\ProvidesFCLanguage{german}[2016/01/12]% % \end{macrocode} % Define macro that converts a number or count register (first % argument) to an ordinal, and stores the result in the @@ -3349,10 +3496,17 @@ z\'ero% }% \global\let\@@teenstringgerman\@@teenstringgerman % \end{macrocode} -% The results are stored in the second argument, but doesn't -% display anything. -% \begin{macrocode} -\DeclareRobustCommand{\@numberstringMgerman}[2]{% +% The results are stored in the second argument, but doesn't display +% anything.% +% \changes{3.02}{2016/01/12}{Replace \cs{DeclareRobustCommand} by +% \cs{newcommand*} as robustness is handled now at top level in +% \texttt{fmtcount.sty}, and we don't need \cs{long} macros. Concerned +% macros are \cs{@numberstringMgerman}, \cs{@NumberstringMgerman}, +% \cs{@ordinalstringMgerman}, \cs{@ordinalstringFgerman}, +% \cs{@ordinalstringNgerman}, \cs{@OrdinalstringMgerman}, +% \cs{@OrdinalstringFgerman}, and \cs{@OrdinalstringNgerman}.} +% \begin{macrocode} +\newcommand*{\@numberstringMgerman}[2]{% \let\@unitstring=\@@unitstringgerman \let\@teenstring=\@@teenstringgerman \let\@tenstring=\@@tenstringgerman @@ -3367,7 +3521,7 @@ z\'ero% % \end{macrocode} % As above, but initial letters in upper case: % \begin{macrocode} -\DeclareRobustCommand{\@NumberstringMgerman}[2]{% +\newcommand*{\@NumberstringMgerman}[2]{% \@numberstringMgerman{#1}{\@@num@str}% \edef#2{\noexpand\MakeUppercase\expandonce\@@num@str}% }% @@ -3380,7 +3534,7 @@ z\'ero% % \end{macrocode} % As above, but for ordinals. % \begin{macrocode} -\DeclareRobustCommand{\@ordinalstringMgerman}[2]{% +\newcommand*{\@ordinalstringMgerman}[2]{% \let\@unitthstring=\@@unitthstringMgerman \let\@teenthstring=\@@teenthstringMgerman \let\@tenthstring=\@@tenthstringMgerman @@ -3395,7 +3549,7 @@ z\'ero% % \end{macrocode} % Feminine form: % \begin{macrocode} -\DeclareRobustCommand{\@ordinalstringFgerman}[2]{% +\newcommand*{\@ordinalstringFgerman}[2]{% \let\@unitthstring=\@@unitthstringFgerman \let\@teenthstring=\@@teenthstringFgerman \let\@tenthstring=\@@tenthstringFgerman @@ -3410,7 +3564,7 @@ z\'ero% % \end{macrocode} % Neuter form: % \begin{macrocode} -\DeclareRobustCommand{\@ordinalstringNgerman}[2]{% +\newcommand*{\@ordinalstringNgerman}[2]{% \let\@unitthstring=\@@unitthstringNgerman \let\@teenthstring=\@@teenthstringNgerman \let\@tenthstring=\@@tenthstringNgerman @@ -3425,7 +3579,7 @@ z\'ero% % \end{macrocode} % As above, but with initial letters in upper case. % \begin{macrocode} -\DeclareRobustCommand{\@OrdinalstringMgerman}[2]{% +\newcommand*{\@OrdinalstringMgerman}[2]{% \@ordinalstringMgerman{#1}{\@@num@str}% \edef#2{\noexpand\MakeUppercase\expandonce\@@num@str}% }% @@ -3433,7 +3587,7 @@ z\'ero% % \end{macrocode} % Feminine form: % \begin{macrocode} -\DeclareRobustCommand{\@OrdinalstringFgerman}[2]{% +\newcommand*{\@OrdinalstringFgerman}[2]{% \@ordinalstringFgerman{#1}{\@@num@str}% \edef#2{\noexpand\MakeUppercase\expandonce\@@num@str}% }% @@ -3441,7 +3595,7 @@ z\'ero% % \end{macrocode} % Neuter form: % \begin{macrocode} -\DeclareRobustCommand{\@OrdinalstringNgerman}[2]{% +\newcommand*{\@OrdinalstringNgerman}[2]{% \@ordinalstringNgerman{#1}{\@@num@str}% \edef#2{\noexpand\MakeUppercase\expandonce\@@num@str}% }% @@ -3824,7 +3978,9 @@ z\'ero% % \begin{macrocode} \FCloadlang{germanb}% % \end{macrocode} - +\iffalse Local variables: \fi +\iffalse mode: docTeX \fi +\iffalse End: \fi %\iffalse % \begin{macrocode} %</fc-german.def> @@ -4018,7 +4174,7 @@ z\'ero% % \subsubsection{fc-portuges.def} % Portuguse definitions % \begin{macrocode} -\ProvidesFCLanguage{portuges}[2014/06/09]% +\ProvidesFCLanguage{portuges}[2016/01/12]% % \end{macrocode} % Define macro that converts a number or count register (first % argument) to an ordinal, and stores the result in the second @@ -4270,8 +4426,15 @@ z\'ero% % anything. Since it only affects internal macros, it shouldn't % affect documents created with older versions. (These internal % macros are not meant for use in documents.) -% \begin{macrocode} -\DeclareRobustCommand{\@numberstringMportuges}[2]{% +% \changes{3.02}{2016/01/12}{Replace \cs{DeclareRobustCommand} by % +\cs{newcommand*} as robustness is handled now at top level in % +\texttt{fmtcount.sty}, and we don't need \cs{long} macros. Concerned % +macros are \cs{@numberstringMportuges}, \cs{@numberstringFportuges}, +\cs{@NumberstringMportuges}, \cs{@NumberstringFportuges}, +\cs{@ordinalstringMportuges}, \cs{@ordinalstringFportuges}, +\cs{@OrdinalstringMportuges}, and \cs{@OrdinalstringFportuges}.} +% \begin{macrocode} +\newcommand*{\@numberstringMportuges}[2]{% \let\@unitstring=\@@unitstringportuges \let\@teenstring=\@@teenstringportuges \let\@tenstring=\@@tenstringportuges @@ -4284,7 +4447,7 @@ z\'ero% % \end{macrocode} % As above, but feminine form: % \begin{macrocode} -\DeclareRobustCommand{\@numberstringFportuges}[2]{% +\newcommand*{\@numberstringFportuges}[2]{% \let\@unitstring=\@@unitstringFportuges \let\@teenstring=\@@teenstringportuges \let\@tenstring=\@@tenstringportuges @@ -4301,7 +4464,7 @@ z\'ero% % \end{macrocode} % As above, but initial letters in upper case: % \begin{macrocode} -\DeclareRobustCommand{\@NumberstringMportuges}[2]{% +\newcommand*{\@NumberstringMportuges}[2]{% \let\@unitstring=\@@Unitstringportuges \let\@teenstring=\@@Teenstringportuges \let\@tenstring=\@@Tenstringportuges @@ -4314,7 +4477,7 @@ z\'ero% % \end{macrocode} % As above, but feminine form: % \begin{macrocode} -\DeclareRobustCommand{\@NumberstringFportuges}[2]{% +\newcommand*{\@NumberstringFportuges}[2]{% \let\@unitstring=\@@UnitstringFportuges \let\@teenstring=\@@Teenstringportuges \let\@tenstring=\@@Tenstringportuges @@ -4331,7 +4494,7 @@ z\'ero% % \end{macrocode} % As above, but for ordinals. % \begin{macrocode} -\DeclareRobustCommand{\@ordinalstringMportuges}[2]{% +\newcommand*{\@ordinalstringMportuges}[2]{% \let\@unitthstring=\@@unitthstringportuges \let\@unitstring=\@@unitstringportuges \let\@teenthstring=\@@teenthstringportuges @@ -4344,7 +4507,7 @@ z\'ero% % \end{macrocode} % Feminine form: % \begin{macrocode} -\DeclareRobustCommand{\@ordinalstringFportuges}[2]{% +\newcommand*{\@ordinalstringFportuges}[2]{% \let\@unitthstring=\@@unitthstringFportuges \let\@unitstring=\@@unitstringFportuges \let\@teenthstring=\@@teenthstringportuges @@ -4361,7 +4524,7 @@ z\'ero% % \end{macrocode} % As above, but initial letters in upper case (masculine): % \begin{macrocode} -\DeclareRobustCommand{\@OrdinalstringMportuges}[2]{% +\newcommand*{\@OrdinalstringMportuges}[2]{% \let\@unitthstring=\@@Unitthstringportuges \let\@unitstring=\@@Unitstringportuges \let\@teenthstring=\@@teenthstringportuges @@ -4374,7 +4537,7 @@ z\'ero% % \end{macrocode} % Feminine form: % \begin{macrocode} -\DeclareRobustCommand{\@OrdinalstringFportuges}[2]{% +\newcommand*{\@OrdinalstringFportuges}[2]{% \let\@unitthstring=\@@UnitthstringFportuges \let\@unitstring=\@@UnitstringFportuges \let\@teenthstring=\@@teenthstringportuges @@ -4815,6 +4978,9 @@ this number}% }% \global\let\@@ordinalstringportuges\@@ordinalstringportuges % \end{macrocode} +\iffalse Local variables: \fi +\iffalse mode: docTeX \fi +\iffalse End: \fi %\iffalse % \begin{macrocode} %</fc-portuges.def> @@ -4865,7 +5031,7 @@ this number}% % \subsubsection{fc-spanish.def} % Spanish definitions % \begin{macrocode} -\ProvidesFCLanguage{spanish}[2013/08/17]% +\ProvidesFCLanguage{spanish}[2016/01/12]% % \end{macrocode} % Define macro that converts a number or count register (first % argument) to an ordinal, and stores the result in the @@ -5183,8 +5349,15 @@ this number}% % Since it only affects internal macros, it shouldn't affect % documents created with older versions. (These internal macros % are not meant for use in documents.) -% \begin{macrocode} -\DeclareRobustCommand{\@numberstringMspanish}[2]{% +% \changes{3.02}{2016/01/12}{Replace \cs{DeclareRobustCommand} by +% \cs{newcommand*} as robustness is handled now at top level in +% \texttt{fmtcount.sty}, and we don't need \cs{long} macros. Concerned +% macros as \cs{@numberstringMspanish}, \cs{@numberstringFspanish}, +% \cs{@NumberstringFspanish}, \cs{@ordinalstringMspanish}, +% \cs{@ordinalstringFspanish}, \cs{@OrdinalstringMspanish}, and +% \cs{@OrdinalstringFspanish}.} +% \begin{macrocode} +\newcommand*{\@numberstringMspanish}[2]{% \let\@unitstring=\@@unitstringspanish \let\@teenstring=\@@teenstringspanish \let\@tenstring=\@@tenstringspanish @@ -5200,7 +5373,7 @@ this number}% %\changes{2.0}{2012-06-18}{changed andname to `b' (correction %provided by Fernando Maldonado)} % \begin{macrocode} -\DeclareRobustCommand{\@numberstringFspanish}[2]{% +\newcommand*{\@numberstringFspanish}[2]{% \let\@unitstring=\@@unitstringFspanish \let\@teenstring=\@@teenstringspanish \let\@tenstring=\@@tenstringspanish @@ -5218,7 +5391,7 @@ this number}% % \end{macrocode} % As above, but initial letters in upper case: % \begin{macrocode} -\DeclareRobustCommand{\@NumberstringMspanish}[2]{% +\newcommand*{\@NumberstringMspanish}[2]{% \let\@unitstring=\@@Unitstringspanish \let\@teenstring=\@@Teenstringspanish \let\@tenstring=\@@Tenstringspanish @@ -5234,7 +5407,7 @@ this number}% %\changes{2.0}{2012-06-18}{changed andname to `b' (correction %provided by Fernando Maldonado)} % \begin{macrocode} -\DeclareRobustCommand{\@NumberstringFspanish}[2]{% +\newcommand*{\@NumberstringFspanish}[2]{% \let\@unitstring=\@@UnitstringFspanish \let\@teenstring=\@@Teenstringspanish \let\@tenstring=\@@Tenstringspanish @@ -5252,7 +5425,7 @@ this number}% % \end{macrocode} % As above, but for ordinals. % \begin{macrocode} -\DeclareRobustCommand{\@ordinalstringMspanish}[2]{% +\newcommand*{\@ordinalstringMspanish}[2]{% \let\@unitthstring=\@@unitthstringspanish \let\@unitstring=\@@unitstringspanish \let\@teenthstring=\@@teenthstringspanish @@ -5265,7 +5438,7 @@ this number}% % \end{macrocode} % Feminine form: % \begin{macrocode} -\DeclareRobustCommand{\@ordinalstringFspanish}[2]{% +\newcommand*{\@ordinalstringFspanish}[2]{% \let\@unitthstring=\@@unitthstringFspanish \let\@unitstring=\@@unitstringFspanish \let\@teenthstring=\@@teenthstringFspanish @@ -5282,7 +5455,7 @@ this number}% % \end{macrocode} % As above, but with initial letters in upper case. % \begin{macrocode} -\DeclareRobustCommand{\@OrdinalstringMspanish}[2]{% +\newcommand*{\@OrdinalstringMspanish}[2]{% \let\@unitthstring=\@@Unitthstringspanish \let\@unitstring=\@@Unitstringspanish \let\@teenthstring=\@@Teenthstringspanish @@ -5295,7 +5468,7 @@ this number}% % \end{macrocode} % Feminine form: % \begin{macrocode} -\DeclareRobustCommand{\@OrdinalstringFspanish}[2]{% +\newcommand*{\@OrdinalstringFspanish}[2]{% \let\@unitthstring=\@@UnitthstringFspanish \let\@unitstring=\@@UnitstringFspanish \let\@teenthstring=\@@TeenthstringFspanish @@ -5804,8 +5977,9 @@ this number}% }% \global\let\@@ordinalstringspanish\@@ordinalstringspanish % \end{macrocode} - -%\iffalse +\iffalse Local variables: \fi +\iffalse mode: docTeX \fi +\iffalse End: \fi%\iffalse % \begin{macrocode} %</fc-spanish.def> % \end{macrocode} @@ -5895,7 +6069,7 @@ this number}% %\subsection{fcnumparser.sty} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{fcnumparser}[2012/09/28] +\ProvidesPackage{fcnumparser}[2017/06/15] % \end{macrocode} % \cs{fc@counter@parser} is just a shorthand to parse a number held in a counter. % \begin{macrocode} @@ -6368,26 +6542,26 @@ this number}% \def\fc@get@last@word#1#2#3{% {% % \end{macrocode} -% First we split \texttt{\#1} into two parts: everything that is upto \cs{fc@case} exclusive goes to -% \cs{toks0}, and evrything from \cs{fc@case} exclusive upto the final \cs{@nil} exclusive goes to \cs{toks1}. +% First we split \texttt{\#1} into two parts: everything that is upto \cs{fc@wcase} exclusive goes to +% \cs{toks0}, and evrything from \cs{fc@wcase} exclusive upto the final \cs{@nil} exclusive goes to \cs{toks1}. % \begin{macrocode} - \def\@tempa##1\fc@case##2\@nil\fc@end{% + \def\@tempa##1\fc@wcase##2\@nil\fc@end{% \toks0{##1}% % \end{macrocode} -% Actually a dummy \cs{fc@case} is appended to \cs{toks1}, because that makes easier further checking that it -% does not contains any other \cs{fc@case}. +% Actually a dummy \cs{fc@wcase} is appended to \cs{toks1}, because that makes easier further checking that it +% does not contains any other \cs{fc@wcase}. % \begin{macrocode} - \toks1{##2\fc@case}% + \toks1{##2\fc@wcase}% }% \@tempa#1\fc@end % \end{macrocode} % Now leading part upto last word should be in \cs{toks0}, and last word should be in \cs{toks1}. However we -% need to check that this is really the last word, i.e. we need to check that there is no \cs{fc@case} inside +% need to check that this is really the last word, i.e. we need to check that there is no \cs{fc@wcase} inside % \cs{toks1} other than the tailing dummy one. To that purpose we will loop while we find that \cs{toks1} -% contains some \cs{fc@case}. First we define \cs{@tempa} to split \cs{the}\cs{toks1} between parts before and -% after some potential \cs{fc@case}. +% contains some \cs{fc@wcase}. First we define \cs{@tempa} to split \cs{the}\cs{toks1} between parts before and +% after some potential \cs{fc@wcase}. % \begin{macrocode} - \def\@tempa##1\fc@case##2\fc@end{% + \def\@tempa##1\fc@wcase##2\fc@end{% \toks2{##1}% \def\@tempb{##2}% \toks3{##2}% @@ -6403,7 +6577,7 @@ this number}% \expandafter\@tempa\the\toks1 \fc@end \ifx\@tempb\@empty % \end{macrocode} -% \cs{@tempb} empty means that the only \cs{fc@case} found in \cs{the}\cs{toks1} is the dummy one. So we end +% \cs{@tempb} empty means that the only \cs{fc@wcase} found in \cs{the}\cs{toks1} is the dummy one. So we end % the loop here, \cs{toks2} contains the last word. % \begin{macrocode} \let\next\relax @@ -6414,7 +6588,7 @@ this number}% \expandafter\expandafter\expandafter\@tempt \expandafter\expandafter\expandafter{% \expandafter\the\expandafter\@tempt - \expandafter\fc@case\the\toks2}% + \expandafter\fc@wcase\the\toks2}% \toks1\toks3 % \fi \next @@ -7081,11 +7255,12 @@ this number}% %<*fmtcount.sty> % \end{macrocode} %\fi + %\subsection{fmtcount.sty} % This section deals with the code for |fmtcount.sty| % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{fmtcount}[2015/05/05 v3.01] +\ProvidesPackage{fmtcount}[2016/01/12 v3.02] \RequirePackage{ifthen} % \end{macrocode} % \changes{3.01}{2014-12-18}{Use \styfmt{xkeyval} instead of \styfmt{keyval}, so that we do not get in trouble @@ -7463,7 +7638,7 @@ italian} %\end{option} %\begin{macro}{\fmtcountsetoptions} % Define command to set options. -% \changes{3.01}{2014-12-18}{ Move French specific stuff to \styfmt{french.def}.} +% \changes{3.01}{2014-12-18}{Move French specific stuff to \styfmt{french.def}.} % \begin{macrocode} \def\fmtcountsetoptions{% \def\fmtcount@fmtord{}% @@ -7569,8 +7744,9 @@ italian} % \end{macrocode} %\begin{macro}{\binarynum} % Converts a decimal number to binary, and display. +%\changes{3.02}{2016/01/08}{Made robust using \texttt{etoolbox} \cs{newrobustcmd}} % \begin{macrocode} -\newcommand*{\@binary}[1]{% +\newrobustcmd*{\@binary}[1]{% \@DT@padzeroestrue \@DT@loopN=17\relax \@strctr=\@DT@loopN @@ -7600,8 +7776,9 @@ italian} %\end{macro} %\begin{macro}{\octalnum} % Converts a decimal number to octal, and displays. +%\changes{3.02}{2016/01/08}{Made robust using \texttt{etoolbox} \cs{newrobustcmd}} % \begin{macrocode} -\newcommand*{\@octal}[1]{% +\newrobustcmd*{\@octal}[1]{% \ifnum#1>32768 \PackageError{fmtcount}% {Value of counter too large for \protect\@octal} @@ -7645,8 +7822,9 @@ italian} %\begin{macro}{\hexadecimalnum} % Converts a decimal number to a lowercase hexadecimal number, % and displays it. +%\changes{3.02}{2016/01/08}{Made robust using \texttt{etoolbox} \cs{newrobustcmd}} % \begin{macrocode} -\newcommand*{\@hexadecimal}[1]{% +\newrobustcmd*{\@hexadecimal}[1]{% \@DT@padzeroestrue \@DT@loopN=5\relax \@strctr=\@DT@loopN @@ -7683,8 +7861,9 @@ italian} %\end{macro} %\begin{macro}{\Hexadecimalnum} % Uppercase hexadecimal +%\changes{3.02}{2016/01/08}{Made robust using \texttt{etoolbox} \cs{newrobustcmd}} % \begin{macrocode} -\newcommand*{\@Hexadecimal}[1]{% +\newrobustcmd*{\@Hexadecimal}[1]{% \@DT@padzeroestrue \@DT@loopN=5\relax \@strctr=\@DT@loopN @@ -7713,8 +7892,9 @@ italian} %\end{macro} %\begin{macro}{\aaalphnum} % Lowercase alphabetical representation (a \ldots\ z aa \ldots\ zz) +%\changes{3.02}{2016/01/08}{Made robust using \texttt{etoolbox} \cs{newrobustcmd}} % \begin{macrocode} -\newcommand*{\@aaalph}[1]{% +\newrobustcmd*{\@aaalph}[1]{% \@DT@loopN=#1\relax \advance\@DT@loopN by -1\relax \divide\@DT@loopN by 26\relax @@ -7737,8 +7917,9 @@ italian} %\end{macro} %\begin{macro}{\AAAlphnum} % Uppercase alphabetical representation (a \ldots\ z aa \ldots\ zz) +%\changes{3.02}{2016/01/08}{Made robust using \texttt{etoolbox} \cs{newrobustcmd}} % \begin{macrocode} -\newcommand*{\@AAAlph}[1]{% +\newrobustcmd*{\@AAAlph}[1]{% \@DT@loopN=#1\relax \advance\@DT@loopN by -1\relax \divide\@DT@loopN by 26\relax @@ -7761,8 +7942,9 @@ italian} %\end{macro} %\begin{macro}{\abalphnum} % Lowercase alphabetical representation +%\changes{3.02}{2016/01/08}{Made robust using \texttt{etoolbox} \cs{newrobustcmd}} % \begin{macrocode} -\newcommand*{\@abalph}[1]{% +\newrobustcmd*{\@abalph}[1]{% \ifnum#1>17576\relax \PackageError{fmtcount}% {Value of counter too large for \protect\@abalph}% @@ -7794,8 +7976,9 @@ italian} %\end{macro} %\begin{macro}{\ABAlphnum} % Uppercase alphabetical representation +%\changes{3.02}{2016/01/08}{Made robust using \texttt{etoolbox} \cs{newrobustcmd}} % \begin{macrocode} -\newcommand*{\@ABAlph}[1]{% +\newrobustcmd*{\@ABAlph}[1]{% \ifnum#1>17576\relax \PackageError{fmtcount}% {Value of counter too large for \protect\@ABAlph}% @@ -7840,8 +8023,9 @@ italian} %\begin{macro}{\@decimal} %\changes{1.31}{2009/10/02}{fixed unwanted space.} % Format number as a decimal, possibly padded with zeroes in front. +%\changes{3.02}{2016/01/08}{Made robust using \texttt{etoolbox} \cs{newrobustcmd}} % \begin{macrocode} -\newcommand{\@decimal}[1]{% +\newrobustcmd*{\@decimal}[1]{% \@strctr=0\relax \expandafter\@fmtc@count\number#1\relax \@DT@loopN=\c@padzeroesN @@ -7875,10 +8059,12 @@ italian} % argument is omitted. % Version 1.04 changed \cs{ordinal} to \cs{FCordinal} % to prevent it clashing with the memoir class. +% \changes{3.02}{2015/08/01}{Suppress useless \cs{expandafter}'s and and use \cs{value} instead tweaking with +% \cs{csname}. Do not use any longer \cs{protect} as \cs{ordinalnum} is made robust.} % \begin{macrocode} \newcommand{\FCordinal}[1]{% - \expandafter\protect\expandafter\ordinalnum{% - \expandafter\the\csname c@#1\endcsname}% + \ordinalnum{% + \the\value{#1}}% } % \end{macrocode} %\end{macro} @@ -7903,8 +8089,9 @@ italian} % count register instead of a counter: %\changes{1.31}{2009/10/02}{replaced \cs{@ifnextchar} with %\cs{new@ifnextchar}} +% \changes{3.02}{2015-08-01}{Make \cs{ordinalnum} robust.} % \begin{macrocode} -\newcommand*{\ordinalnum}[1]{% +\DeclareRobustCommand*{\ordinalnum}[1]{% \new@ifnextchar[% {\@ordinalnum{#1}}% {\@ordinalnum{#1}[m]}% @@ -7947,10 +8134,16 @@ italian} %\begin{macro}{\storeordinal} % Store the ordinal (first argument % is identifying name, second argument is a counter.) +% \changes{3.02}{2015-08-01}{Suppress useless \cs{expandafter}'s and and use \cs{value} instead tweaking with +% \cs{csname}. Do not use any longer \cs{protect} as \cs{storeordinalnum} is made robust.} +% \changes{3.02}{2016/01/08}{Expand \cs{the}\cs{value}\texttt{\{\#2\}} once before passing to \cs{storeordinalnum}} % \begin{macrocode} \newcommand*{\storeordinal}[2]{% - \expandafter\protect\expandafter\storeordinalnum{#1}{% - \expandafter\the\csname c@#2\endcsname}% + {% + \toks0{\storeordinalnum{#1}}% + \expandafter + }\the\toks0\expandafter{% + \the\value{#2}}% } % \end{macrocode} %\end{macro} @@ -7958,8 +8151,9 @@ italian} % Store ordinal (first argument % is identifying name, second argument is a number or % count register.) +% \changes{3.02}{2016/01/08}{Make \cs{storeordinalnum} robust with etoolbox \cs{newrobustcmd}.} % \begin{macrocode} -\newcommand*{\storeordinalnum}[2]{% +\newrobustcmd*{\storeordinalnum}[2]{% \@ifnextchar[% {\@storeordinalnum{#1}{#2}}% {\@storeordinalnum{#1}{#2}[m]}% @@ -8001,11 +8195,16 @@ italian} % \end{macrocode} %\end{macro} %\begin{macro}{\ordinalstring} -% Display ordinal as a string (argument is a counter) +% Display ordinal as a string (argument is a counter) +% \changes{3.02}{2016/01/08}{Suppress useless \cs{expandafter}'s and +% and use \cs{value} instead tweaking with \cs{csname}. Do not use +% any longer \cs{protect} as \cs{ordinalstringnum} is made +% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before +% passing to \cs{ordinalstringnum}} % \begin{macrocode} \newcommand*{\ordinalstring}[1]{% - \expandafter\protect\expandafter\ordinalstringnum{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\ordinalstringnum\expandafter{% + \the\value{#1}}% } % \end{macrocode} %\end{macro} @@ -8015,8 +8214,9 @@ italian} %\changes{1.31}{2009/10/02}{replaced \cs{@ifnextchar} with %\cs{new@ifnextchar}} %\changes{1.33}{2009/10/15}{Made robust} +%\changes{3.02}{2016/01/08}{Made robust using \texttt{etoolbox} \cs{newrobustcmd}} % \begin{macrocode} -\newcommand{\ordinalstringnum}[1]{% +\newrobustcmd*{\ordinalstringnum}[1]{% \new@ifnextchar[% {\@ordinal@string{#1}}% {\@ordinal@string{#1}[m]}% @@ -8060,18 +8260,26 @@ italian} % Store textual representation of number. First argument is % identifying name, second argument is the counter set to the % required number. +% \changes{3.02}{2016/01/08}{Suppress useless \cs{expandafter}'s and +% and use \cs{value} instead tweaking with \cs{csname}. Do not use any +% longer \cs{protect} as \cs{storeordinalstringnum} is made +% robust. Expand \cs{the}\cs{value}\texttt{\{\#2\}} once before +% passing to \cs{storeordinalstringnum}} % \begin{macrocode} \newcommand*{\storeordinalstring}[2]{% - \expandafter\protect\expandafter\storeordinalstringnum{#1}{% - \expandafter\the\csname c@#2\endcsname}% + {% + \toks0{\storeordinalstringnum{#1}}% + \expandafter + }\the\toks0\expandafter{\the\value{#2}}% } % \end{macrocode} %\end{macro} %\begin{macro}{\storeordinalstringnum} % Store textual representation of number. First argument is % identifying name, second argument is a count register or number. +%\changes{3.02}{2016/01/08}{Made robust using \texttt{etoolbox} \cs{newrobustcmd}} % \begin{macrocode} -\newcommand*{\storeordinalstringnum}[2]{% +\newrobustcmd*{\storeordinalstringnum}[2]{% \@ifnextchar[% {\@store@ordinal@string{#1}{#2}}% {\@store@ordinal@string{#1}{#2}[m]}% @@ -8111,10 +8319,15 @@ italian} %\begin{macro}{\Ordinalstring} % Display ordinal as a string with initial letters in upper case % (argument is a counter) +% \changes{3.02}{2016/01/08}{Suppress useless \cs{expandafter}'s and +% and use \cs{value} instead tweaking with \cs{csname}. Do not use any +% longer \cs{protect} as \cs{Ordinalstringnum} is made +% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before +% passing to \cs{Ordinalstringnum}} % \begin{macrocode} \newcommand*{\Ordinalstring}[1]{% - \expandafter\protect\expandafter\Ordinalstringnum{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\Ordinalstringnum\expandafter{% + \the\value{#1}}% } % \end{macrocode} %\end{macro} @@ -8123,8 +8336,9 @@ italian} % (argument is a number or count register) %\changes{1.31}{2009/10/02}{replaced \cs{@ifnextchar} with %\cs{new@ifnextchar}} +%\changes{3.02}{2016/01/08}{Made robust using \texttt{etoolbox} \cs{newrobustcmd}} % \begin{macrocode} -\newcommand*{\Ordinalstringnum}[1]{% +\newrobustcmd*{\Ordinalstringnum}[1]{% \new@ifnextchar[% {\@Ordinal@string{#1}}% {\@Ordinal@string{#1}[m]}% @@ -8167,10 +8381,17 @@ italian} % upper case. First argument is identifying name, second argument % is the counter set to the % required number. +% \changes{3.02}{2016/01/08}{Suppress useless \cs{expandafter}'s and +% and use \cs{value} instead tweaking with \cs{csname}. Do not use any +% longer \cs{protect} as \cs{storeOrdinalstringnum} is made +% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before +% passing to \cs{storeOrdinalstringnum}} % \begin{macrocode} \newcommand*{\storeOrdinalstring}[2]{% - \expandafter\protect\expandafter\storeOrdinalstringnum{#1}{% - \expandafter\the\csname c@#2\endcsname}% + {% + \toks0{\storeOrdinalstringnum{#1}}% + \expandafter + }\the\toks0\expandafter{\the\value{#2}}% } % \end{macrocode} %\end{macro} @@ -8178,8 +8399,9 @@ italian} % Store textual representation of number, with initial letters in % upper case. First argument is identifying name, second argument % is a count register or number. +%\changes{3.02}{2016/01/08}{Made robust using \texttt{etoolbox} \cs{newrobustcmd}} % \begin{macrocode} -\newcommand*{\storeOrdinalstringnum}[2]{% +\newrobustcmd*{\storeOrdinalstringnum}[2]{% \@ifnextchar[% {\@store@Ordinal@string{#1}{#2}}% {\@store@Ordinal@string{#1}{#2}[m]}% @@ -8219,18 +8441,26 @@ italian} %\begin{macro}{\storeORDINALstring} % Store upper case textual representation of ordinal. The first % argument is identifying name, the second argument is a counter. +% \changes{3.02}{2016/01/08}{Suppress useless \cs{expandafter}'s and +% and use \cs{value} instead tweaking with \cs{csname}. Do not use any +% longer \cs{protect} as \cs{storeORDINALstringnum} is made +% robust. Expand \cs{the}\cs{value}\texttt{\{\#2\}} once before +% passing to \cs{storeORDINALstringnum}.} % \begin{macrocode} \newcommand*{\storeORDINALstring}[2]{% - \expandafter\protect\expandafter\storeORDINALstringnum{#1}{% - \expandafter\the\csname c@#2\endcsname}% + {% + \toks0{\storeORDINALstringnum{#1}}% + \expandafter + }\the\toks0\expandafter{\the\value{#2}}% } % \end{macrocode} %\end{macro} %\begin{macro}{\storeORDINALstringnum} % As above, but the second argument is a count register or a % number. +%\changes{3.02}{2016/01/08}{Made robust using \texttt{etoolbox} \cs{newrobustcmd}} % \begin{macrocode} -\newcommand*{\storeORDINALstringnum}[2]{% +\newrobustcmd*{\storeORDINALstringnum}[2]{% \@ifnextchar[% {\@store@ORDINAL@string{#1}{#2}}% {\@store@ORDINAL@string{#1}{#2}[m]}% @@ -8273,10 +8503,15 @@ italian} %\begin{macro}{\ORDINALstring} % Display upper case textual representation of an ordinal. The % argument must be a counter. +% \changes{3.02}{2016/01/08}{Suppress useless \cs{expandafter}'s and +% and use \cs{value} instead tweaking with \cs{csname}. Do not use any +% longer \cs{protect} as \cs{ORDINALstringnum} is made +% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before +% passing to \cs{ORDINALstringnum}} % \begin{macrocode} \newcommand*{\ORDINALstring}[1]{% - \expandafter\protect\expandafter\ORDINALstringnum{% - \expandafter\the\csname c@#1\endcsname + \expandafter\ORDINALstringnum\expandafter{% + \the\value{#1}% }% } % \end{macrocode} @@ -8285,8 +8520,9 @@ italian} % As above, but the argument is a count register or a number. %\changes{1.31}{2009/10/02}{replaced \cs{@ifnextchar} with %\cs{new@ifnextchar}} +%\changes{3.02}{2016/01/08}{Made robust using \texttt{etoolbox} \cs{newrobustcmd}} % \begin{macrocode} -\newcommand*{\ORDINALstringnum}[1]{% +\newrobustcmd*{\ORDINALstringnum}[1]{% \new@ifnextchar[% {\@ORDINAL@string{#1}}% {\@ORDINAL@string{#1}[m]}% @@ -8327,10 +8563,15 @@ italian} % Convert number to textual respresentation, and store. First % argument is the identifying name, second argument is a counter % containing the number. +% \changes{3.02}{2016/01/08}{Suppress useless \cs{expandafter}'s and +% and use \cs{value} instead tweaking with \cs{csname}. Do not use any +% longer \cs{protect} as \cs{storenumberstringnum} is made +% robust. Expand \cs{the}\cs{value}\texttt{\{\#2\}} once before +% passing to \cs{storenumberstringnum}} % \begin{macrocode} \newcommand*{\storenumberstring}[2]{% \expandafter\protect\expandafter\storenumberstringnum{#1}{% - \expandafter\the\csname c@#2\endcsname}% + \expandafter\the\value{#2}}% } % \end{macrocode} %\end{macro} @@ -8375,10 +8616,15 @@ italian} %\begin{macro}{\numberstring} % Display textual representation of a number. The argument % must be a counter. +% \changes{3.02}{2016/01/08}{Suppress useless \cs{expandafter}'s and +% and use \cs{value} instead tweaking with \cs{csname}. Do not use any +% longer \cs{protect} as \cs{numberstringnum} is made +% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before +% passing to \cs{numberstringnum}} % \begin{macrocode} \newcommand*{\numberstring}[1]{% - \expandafter\protect\expandafter\numberstringnum{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\numberstringnum\expandafter{% + \the\value{#1}}% } % \end{macrocode} %\end{macro} @@ -8386,8 +8632,9 @@ italian} % As above, but the argument is a count register or a number. %\changes{1.31}{2009/10/02}{replaced \cs{@ifnextchar} with %\cs{new@ifnextchar}} +%\changes{3.02}{2016/01/08}{Made robust using \texttt{etoolbox} \cs{newrobustcmd}} % \begin{macrocode} -\newcommand*{\numberstringnum}[1]{% +\newrobustcmd*{\numberstringnum}[1]{% \new@ifnextchar[% {\@number@string{#1}}% {\@number@string{#1}[m]}% @@ -8428,10 +8675,17 @@ italian} %\begin{macro}{\storeNumberstring} % Store textual representation of number. First argument is % identifying name, second argument is a counter. +% \changes{3.02}{2016/01/08}{Suppress useless \cs{expandafter}'s and +% and use \cs{value} instead tweaking with \cs{csname}. Do not use any +% longer \cs{protect} as \cs{storeNumberstringnum} is made +% robust. Expand \cs{the}\cs{value}\texttt{\{\#2\}} once before +% passing to \cs{storeNumberstringnum}} % \begin{macrocode} \newcommand*{\storeNumberstring}[2]{% - \expandafter\protect\expandafter\storeNumberstringnum{#1}{% - \expandafter\the\csname c@#2\endcsname}% + {% + \toks0{\storeNumberstringnum{#1}}% + \expandafter + }\the\toks0\expandafter{\the\value{#2}}% } % \end{macrocode} %\end{macro} @@ -8476,10 +8730,15 @@ italian} %\begin{macro}{\Numberstring} % Display textual representation of number. The argument must be % a counter. +% \changes{3.02}{2016/01/08}{Suppress useless \cs{expandafter}'s and +% and use \cs{value} instead tweaking with \cs{csname}. Do not use any +% longer \cs{protect} as \cs{Numberstringnum} is made +% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before +% passing to \cs{Numberstringnum}} % \begin{macrocode} \newcommand*{\Numberstring}[1]{% - \expandafter\protect\expandafter\Numberstringnum{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\Numberstringnum\expandafter{% + \the\value{#1}}% } % \end{macrocode} %\end{macro} @@ -8487,8 +8746,9 @@ italian} % As above, but the argument is a count register or number. %\changes{1.31}{2009/10/02}{replaced \cs{@ifnextchar} with %\cs{new@ifnextchar}} +%\changes{3.02}{2016/01/08}{Made robust using \texttt{etoolbox} \cs{newrobustcmd}} % \begin{macrocode} -\newcommand*{\Numberstringnum}[1]{% +\newrobustcmd*{\Numberstringnum}[1]{% \new@ifnextchar[% {\@Number@string{#1}}% {\@Number@string{#1}[m]}% @@ -8528,10 +8788,17 @@ italian} %\begin{macro}{\storeNUMBERstring} % Store upper case textual representation of number. The first % argument is identifying name, the second argument is a counter. +% \changes{3.02}{2016/01/08}{Suppress useless \cs{expandafter}'s and +% and use \cs{value} instead tweaking with \cs{csname}. Do not use any +% longer \cs{protect} as \cs{storeNUMBERstringnum} is made +% robust. Expand \cs{the}\cs{value}\texttt{\{\#2\}} once before +% passing to \cs{storeNUMBERstringnum}.} % \begin{macrocode} \newcommand{\storeNUMBERstring}[2]{% - \expandafter\protect\expandafter\storeNUMBERstringnum{#1}{% - \expandafter\the\csname c@#2\endcsname}% + {% + \toks0{\storeNUMBERstringnum{#1}}% + \expandafter + }\the\toks0\expandafter{\the\value{#2}}% } % \end{macrocode} %\end{macro} @@ -8579,10 +8846,15 @@ italian} %\begin{macro}{\NUMBERstring} % Display upper case textual representation of a number. The % argument must be a counter. +% \changes{3.02}{2016/01/08}{Suppress useless \cs{expandafter}'s and +% and use \cs{value} instead tweaking with \cs{csname}. Do not use any +% longer \cs{protect} as \cs{NUMBERstringnum} is made +% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before +% passing to \cs{NUMBERstringnum}.} % \begin{macrocode} \newcommand*{\NUMBERstring}[1]{% - \expandafter\protect\expandafter\NUMBERstringnum{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\NUMBERstringnum\expandafter{% + \the\value{#1}}% } % \end{macrocode} %\end{macro} @@ -8590,8 +8862,9 @@ italian} % As above, but the argument is a count register or a number. %\changes{1.31}{2009/10/02}{replaced \cs{@ifnextchar} with %\cs{new@ifnextchar}} +%\changes{3.02}{2016/01/08}{Made robust using \texttt{etoolbox} \cs{newrobustcmd}} % \begin{macrocode} -\newcommand*{\NUMBERstringnum}[1]{% +\newrobustcmd*{\NUMBERstringnum}[1]{% \new@ifnextchar[% {\@NUMBER@string{#1}}% {\@NUMBER@string{#1}[m]}% @@ -8630,89 +8903,143 @@ italian} %\end{macro} %\begin{macro}{\binary} % Number representations in other bases. Binary: +% \changes{3.02}{2016/01/08}{Suppress useless \cs{expandafter}'s and +% and use \cs{value} instead tweaking with \cs{csname}. Do not use any +% longer \cs{protect} as \cs{@binary} is made +% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before +% passing to \cs{@binary}} % \begin{macrocode} \providecommand*{\binary}[1]{% - \expandafter\protect\expandafter\@binary{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\@binary + \expandafter{% + \the\value{#1}}% } % \end{macrocode} %\end{macro} %\begin{macro}{\aaalph} % Like \ics{alph}, but goes beyond 26. % (a \ldots\ z aa \ldots zz \ldots) +% \changes{3.02}{2016/01/08}{Suppress useless \cs{expandafter}'s and +% and use \cs{value} instead tweaking with \cs{csname}. Do not use any +% longer \cs{protect} as \cs{@aaalph} is made +% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before +% passing to \cs{@aaalph}.} % \begin{macrocode} \providecommand*{\aaalph}[1]{% - \expandafter\protect\expandafter\@aaalph{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\@aaalph + \expandafter{% + \the\value{#1}}% } % \end{macrocode} %\end{macro} %\begin{macro}{\AAAlph} % As before, but upper case. +% \changes{3.02}{2016/01/08}{Suppress useless \cs{expandafter}'s and +% and use \cs{value} instead tweaking with \cs{csname}. Do not use any +% longer \cs{protect} as \cs{@AAAlph} is made +% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before +% passing to \cs{@AAAlph}.} % \begin{macrocode} \providecommand*{\AAAlph}[1]{% - \expandafter\protect\expandafter\@AAAlph{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\@AAAlph + \expandafter{% + \the\value{#1}}% } % \end{macrocode} %\end{macro} %\begin{macro}{\abalph} % Like \ics{alph}, but goes beyond 26. % (a \ldots\ z ab \ldots az \ldots) +% \changes{3.02}{2016/01/08}{Suppress useless \cs{expandafter}'s and +% and use \cs{value} instead tweaking with \cs{csname}. Do not use any +% longer \cs{protect} as \cs{@abalph} is made +% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before +% passing to \cs{@abalph}.} % \begin{macrocode} \providecommand*{\abalph}[1]{% - \expandafter\protect\expandafter\@abalph{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\@abalph + \expandafter{% + \the\value{#1}}% } % \end{macrocode} %\end{macro} %\begin{macro}{\ABAlph} % As above, but upper case. +% \changes{3.02}{2016/01/08}{Suppress useless \cs{expandafter}'s and +% and use \cs{value} instead tweaking with \cs{csname}. Do not use any +% longer \cs{protect} as \cs{@ABAlph} is made +% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before +% passing to \cs{@ABAlph}.} % \begin{macrocode} \providecommand*{\ABAlph}[1]{% - \expandafter\protect\expandafter\@ABAlph{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\@ABAlph + \expandafter{% + \the\value{#1}}% } % \end{macrocode} %\end{macro} %\begin{macro}{\hexadecimal} % Hexadecimal: +% \changes{3.02}{2016/01/08}{Suppress useless \cs{expandafter}'s and +% and use \cs{value} instead tweaking with \cs{csname}. Do not use any +% longer \cs{protect} as \cs{@hexadecimal} is made +% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before +% passing to \cs{@hexadecimal}.} % \begin{macrocode} \providecommand*{\hexadecimal}[1]{% - \expandafter\protect\expandafter\@hexadecimal{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\@hexadecimal + \expandafter{% + \the\value{#1}}% } % \end{macrocode} %\end{macro} %\begin{macro}{\Hexadecimal} % As above, but in upper case. +% \changes{3.02}{2016/01/08}{Suppress useless \cs{expandafter}'s and +% and use \cs{value} instead tweaking with \cs{csname}. Do not use any +% longer \cs{protect} as \cs{@Hexadecimal} is made +% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before +% passing to \cs{@Hexadecimal}.} % \begin{macrocode} \providecommand*{\Hexadecimal}[1]{% - \expandafter\protect\expandafter\@Hexadecimal{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\@Hexadecimal + \expandafter{% + \the\value{#1}}% } % \end{macrocode} %\end{macro} %\begin{macro}{\octal} % Octal: +% \changes{3.02}{2016/01/08}{Suppress useless \cs{expandafter}'s and +% and use \cs{value} instead tweaking with \cs{csname}. Do not use any +% longer \cs{protect} as \cs{@octal} is made +% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before +% passing to \cs{@octal}} % \begin{macrocode} \providecommand*{\octal}[1]{% - \expandafter\protect\expandafter\@octal{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\@octal + \expandafter{% + \the\value{#1}}% } % \end{macrocode} %\end{macro} %\begin{macro}{\decimal} % Decimal: +% \changes{3.02}{2016/01/08}{Suppress useless \cs{expandafter}'s and +% and use \cs{value} instead tweaking with \cs{csname}. Do not use any +% longer \cs{protect} as \cs{@decimal} is made +% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before +% passing to \cs{@decimal}} % \begin{macrocode} \providecommand*{\decimal}[1]{% - \expandafter\protect\expandafter\@decimal{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\@decimal + \expandafter{% + \the\value{#1}}% } % \end{macrocode} %\end{macro} % -%\subsection{Multilinguage Definitions} +%\subsubsection{Multilinguage Definitions} %\begin{macro}{\@setdef@ultfmtcount} % If multilingual support is provided, make \cs{@numberstring} % etc use the correct language (if defined). diff --git a/Master/texmf-dist/source/latex/fmtcount/fmtcount.ins b/Master/texmf-dist/source/latex/fmtcount/fmtcount.ins index 5a40522adae..8d25c56ac77 100644 --- a/Master/texmf-dist/source/latex/fmtcount/fmtcount.ins +++ b/Master/texmf-dist/source/latex/fmtcount/fmtcount.ins @@ -1,10 +1,10 @@ -% fmtcount.ins generated using makedtx version 0.94b 2015/5/8 16:50 +% fmtcount.ins generated using makedtx version 0.94b 2017/6/15 19:28 \input docstrip \preamble fmtcount.dtx - Copyright 2015 Nicola Talbot and Vincent Belaïche + Copyright 2017 Nicola Talbot and Vincent Belaïche This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/fmtcount/fc-UKenglish.def b/Master/texmf-dist/tex/latex/fmtcount/fc-UKenglish.def index 9a7ccc3c5d9..9fc43ac3f22 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fc-UKenglish.def +++ b/Master/texmf-dist/tex/latex/fmtcount/fc-UKenglish.def @@ -7,7 +7,7 @@ %% fmtcount.dtx (with options: `fc-UKenglish.def,package') %% %% fmtcount.dtx -%% Copyright 2015 Nicola Talbot and Vincent Belaïche +%% Copyright 2017 Nicola Talbot and Vincent Belaïche %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/fmtcount/fc-USenglish.def b/Master/texmf-dist/tex/latex/fmtcount/fc-USenglish.def index 711a25082ba..70e572e5d9a 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fc-USenglish.def +++ b/Master/texmf-dist/tex/latex/fmtcount/fc-USenglish.def @@ -7,7 +7,7 @@ %% fmtcount.dtx (with options: `fc-USenglish.def,package') %% %% fmtcount.dtx -%% Copyright 2015 Nicola Talbot and Vincent Belaïche +%% Copyright 2017 Nicola Talbot and Vincent Belaïche %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/fmtcount/fc-american.def b/Master/texmf-dist/tex/latex/fmtcount/fc-american.def index d143d70ca68..af698749158 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fc-american.def +++ b/Master/texmf-dist/tex/latex/fmtcount/fc-american.def @@ -7,7 +7,7 @@ %% fmtcount.dtx (with options: `fc-american.def,package') %% %% fmtcount.dtx -%% Copyright 2015 Nicola Talbot and Vincent Belaïche +%% Copyright 2017 Nicola Talbot and Vincent Belaïche %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -51,7 +51,7 @@ %% Local Variables: %% coding: utf-8 %% End: -\ProvidesFCLanguage{american}[2013/08/17]% +\ProvidesFCLanguage{american}[2016/01/12]% \FCloadlang{USenglish}% \global\let\@ordinalMamerican\@ordinalMUSenglish \global\let\@ordinalFamerican\@ordinalMUSenglish @@ -68,6 +68,9 @@ \global\let\@OrdinalstringMamerican\@OrdinalstringMUSenglish \global\let\@OrdinalstringFamerican\@OrdinalstringMUSenglish \global\let\@OrdinalstringNamerican\@OrdinalstringMUSenglish +\iffalse Local variables: \fi +\iffalse mode: docTeX \fi +\iffalse End: \fi \endinput %% %% End of file `fc-american.def'. diff --git a/Master/texmf-dist/tex/latex/fmtcount/fc-british.def b/Master/texmf-dist/tex/latex/fmtcount/fc-british.def index 787ce1dea3a..b789969a0c2 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fc-british.def +++ b/Master/texmf-dist/tex/latex/fmtcount/fc-british.def @@ -7,7 +7,7 @@ %% fmtcount.dtx (with options: `fc-british.def,package') %% %% fmtcount.dtx -%% Copyright 2015 Nicola Talbot and Vincent Belaïche +%% Copyright 2017 Nicola Talbot and Vincent Belaïche %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/fmtcount/fc-english.def b/Master/texmf-dist/tex/latex/fmtcount/fc-english.def index 1b4d41824b4..fa0899efc61 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fc-english.def +++ b/Master/texmf-dist/tex/latex/fmtcount/fc-english.def @@ -7,7 +7,7 @@ %% fmtcount.dtx (with options: `fc-english.def,package') %% %% fmtcount.dtx -%% Copyright 2015 Nicola Talbot and Vincent Belaïche +%% Copyright 2017 Nicola Talbot and Vincent Belaïche %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -51,7 +51,7 @@ %% Local Variables: %% coding: utf-8 %% End: -\ProvidesFCLanguage{english}[2013/08/17]% +\ProvidesFCLanguage{english}[2016/01/12]% \newcommand*\@ordinalMenglish[2]{% \def\@fc@ord{}% \@orgargctr=#1\relax @@ -256,7 +256,7 @@ this number}% \fi }% \global\let\@@numberstringenglish\@@numberstringenglish -\DeclareRobustCommand{\@numberstringMenglish}[2]{% +\newcommand*{\@numberstringMenglish}[2]{% \let\@unitstring=\@@unitstringenglish \let\@teenstring=\@@teenstringenglish \let\@tenstring=\@@tenstringenglish @@ -478,7 +478,7 @@ this number}% \fi }% \global\let\@@ordinalstringenglish\@@ordinalstringenglish -\DeclareRobustCommand{\@ordinalstringMenglish}[2]{% +\newcommand*{\@ordinalstringMenglish}[2]{% \let\@unitthstring=\@@unitthstringenglish \let\@teenthstring=\@@teenthstringenglish \let\@tenthstring=\@@tenthstringenglish @@ -493,7 +493,7 @@ this number}% \global\let\@ordinalstringMenglish\@ordinalstringMenglish \global\let\@ordinalstringFenglish=\@ordinalstringMenglish \global\let\@ordinalstringNenglish=\@ordinalstringMenglish -\DeclareRobustCommand{\@OrdinalstringMenglish}[2]{% +\newcommand*{\@OrdinalstringMenglish}[2]{% \let\@unitthstring=\@@Unitthstringenglish \let\@teenthstring=\@@Teenthstringenglish \let\@tenthstring=\@@Tenthstringenglish @@ -508,6 +508,9 @@ this number}% \global\let\@OrdinalstringMenglish\@OrdinalstringMenglish \global\let\@OrdinalstringFenglish=\@OrdinalstringMenglish \global\let\@OrdinalstringNenglish=\@OrdinalstringMenglish +\iffalse Local variables: \fi +\iffalse mode: docTeX \fi +\iffalse End: \fi \endinput %% %% End of file `fc-english.def'. diff --git a/Master/texmf-dist/tex/latex/fmtcount/fc-francais.def b/Master/texmf-dist/tex/latex/fmtcount/fc-francais.def index 607da3c3229..1011938695a 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fc-francais.def +++ b/Master/texmf-dist/tex/latex/fmtcount/fc-francais.def @@ -7,7 +7,7 @@ %% fmtcount.dtx (with options: `fc-francais.def,package') %% %% fmtcount.dtx -%% Copyright 2015 Nicola Talbot and Vincent Belaïche +%% Copyright 2017 Nicola Talbot and Vincent Belaïche %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/fmtcount/fc-french.def b/Master/texmf-dist/tex/latex/fmtcount/fc-french.def index af6c49a242f..4b5100df890 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fc-french.def +++ b/Master/texmf-dist/tex/latex/fmtcount/fc-french.def @@ -7,7 +7,7 @@ %% fmtcount.dtx (with options: `fc-french.def,package') %% %% fmtcount.dtx -%% Copyright 2015 Nicola Talbot and Vincent Belaïche +%% Copyright 2017 Nicola Talbot and Vincent Belaïche %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -51,51 +51,59 @@ %% Local Variables: %% coding: utf-8 %% End: -\ProvidesFCLanguage{french}[2012/10/24]% -\def\fc@french@set@plural#1#2#3#4#5#6{% +\ProvidesFCLanguage{french}[2017/06/15]% +\ifcsundef{fc@gl@let}{\global\let\fc@gl@let\let}{\PackageError{fmtcount}{Command already defined}{Command +\protect\fc@gl@let\space already defined.}} +\ifcsundef{fc@gl@def}{\global\let\fc@gl@def\def}{\PackageError{fmtcount}{Command already defined}{Command +\protect\fc@gl@def\space already defined.}} +\gdef\fc@french@set@plural#1#2#3#4#5#6{% \ifthenelse{\equal{#2}{reformed}}{% - \expandafter\def\csname fc@frenchoptions@#1@plural\endcsname{#3}% + \expandafter\fc@gl@def\csname fc@frenchoptions@#1@plural\endcsname{#3}% }{% \ifthenelse{\equal{#2}{traditional}}{% - \expandafter\def\csname fc@frenchoptions@#1@plural\endcsname{#4}% + \expandafter\fc@gl@def\csname fc@frenchoptions@#1@plural\endcsname{#4}% }{% \ifthenelse{\equal{#2}{reformed o}}{% - \expandafter\def\csname fc@frenchoptions@#1@plural\endcsname{#5}% + \expandafter\fc@gl@def\csname fc@frenchoptions@#1@plural\endcsname{#5}% }{% \ifthenelse{\equal{#2}{traditional o}}{% - \expandafter\def\csname fc@frenchoptions@#1@plural\endcsname{#6}% + \expandafter\fc@gl@def\csname fc@frenchoptions@#1@plural\endcsname{#6}% }{% \ifthenelse{\equal{#2}{always}}{% - \expandafter\def\csname fc@frenchoptions@#1@plural\endcsname{0}% + \expandafter\fc@gl@def\csname fc@frenchoptions@#1@plural\endcsname{0}% }{% \ifthenelse{\equal{#2}{never}}{% - \expandafter\def\csname fc@frenchoptions@#1@plural\endcsname{1}% + \expandafter\fc@gl@def\csname fc@frenchoptions@#1@plural\endcsname{1}% }{% \ifthenelse{\equal{#2}{multiple}}{% - \expandafter\def\csname fc@frenchoptions@#1@plural\endcsname{2}% + \expandafter\fc@gl@def\csname fc@frenchoptions@#1@plural\endcsname{2}% }{% \ifthenelse{\equal{#2}{multiple g-last}}{% - \expandafter\def\csname fc@frenchoptions@#1@plural\endcsname{3}% + \expandafter\fc@gl@def\csname fc@frenchoptions@#1@plural\endcsname{3}% }{% \ifthenelse{\equal{#2}{multiple l-last}}{% - \expandafter\def\csname fc@frenchoptions@#1@plural\endcsname{4}% + \expandafter\fc@gl@def\csname fc@frenchoptions@#1@plural\endcsname{4}% }{% \ifthenelse{\equal{#2}{multiple lng-last}}{% - \expandafter\def\csname fc@frenchoptions@#1@plural\endcsname{5}% + \expandafter\fc@gl@def\csname fc@frenchoptions@#1@plural\endcsname{5}% }{% \ifthenelse{\equal{#2}{multiple ng-last}}{% - \expandafter\def\csname fc@frenchoptions@#1@plural\endcsname{6}% + \expandafter\fc@gl@def\csname fc@frenchoptions@#1@plural\endcsname{6}% }{% \PackageError{fmtcount}{Unexpected argument}{% `#2' was unexpected: french option `#1 plural' expects `reformed', `traditional', `reformed o', `traditional o', `always', `never', `multiple', `multiple g-last', `multiple l-last', `multiple lng-last', or `multiple ng-last'.% - }}}}}}}}}}}}} + }}}}}}}}}}}}}% \def\@tempa#1#2#3{% \define@key{fcfrench}{#1 plural}[reformed]{% \fc@french@set@plural{#1}{##1}{#2}{#2}{#3}{#3}% }% -} + \expandafter\@tempb\csname KV@fcfrench@#1 plural\endcsname +}% +\def\@tempb#1{% + \global\let#1#1 +}% \@tempa{vingt}{4}{5} \@tempa{cent}{4}{5} \@tempa{mil}{0}{0} @@ -107,7 +115,8 @@ \csname KV@fcfrench@mil plural\endcsname{#1}% \csname KV@fcfrench@n-illion plural\endcsname{#1}% \csname KV@fcfrench@n-illiard plural\endcsname{#1}% -} +}% +\expandafter\@tempb\csname KV@fcfrench@all plural\endcsname \define@key{fcfrench}{dash or space}[reformed]{% \ifthenelse{\equal{#1}{traditional}}{% \let\fc@frenchoptions@supermillion@dos\space% @@ -127,7 +136,7 @@ }% }% }% -} +}% \define@key{fcfrench}{scale}[recursive]{% \ifthenelse{\equal{#1}{long}}{% \let\fc@poweroften\fc@@pot@longscalefrench @@ -144,7 +153,7 @@ }% }% }% -} +}% \define@key{fcfrench}{n-illiard upto}[infinity]{% \ifthenelse{\equal{#1}{infinity}}{% \def\fc@longscale@nilliard@upto{0}% @@ -159,16 +168,16 @@ \fi \def\fc@longscale@nilliard@upto{#1}% }}% -} +}% \def\@tempa#1{% \define@key{fcfrench}{#1}[]{% \PackageError{fmtcount}{Unexpected argument}{French option with key `#1' does not take any value}}% - \expandafter\def\csname KV@fcfrench@#1@default\endcsname{% - \def\fmtcount@french{#1}}% + \csgdef{KV@fcfrench@#1@default}{% + \fc@gl@def\fmtcount@french{#1}}% }% \@tempa{france}\@tempa{swiss}\@tempa{belgian}% -\def\fmtcount@french{france}% +\gdef\fmtcount@french{france}% \define@key{fcfrench}{dialect}[france]{% \ifthenelse{\equal{#1}{france} \or\equal{#1}{swiss} @@ -176,21 +185,25 @@ \def\fmtcount@french{#1}}{% \PackageError{fmtcount}{Invalid value `#1' to french option dialect key} {Option `french' can only take the values `france', - `belgian' or `swiss'}}} + `belgian' or `swiss'}}}% +\expandafter\@tempb\csname KV@fcfrench@dialect\endcsname \define@key{fcfrench}{mil plural mark}[le]{% \def\fc@frenchoptions@mil@plural@mark{#1}} -\def\fc@UpperCaseFirstLetter#1#2\@nil{% +\expandafter\@tempb\csname KV@fcfrench@mil plural mark\endcsname +\gdef\fc@UpperCaseFirstLetter#1#2\@nil{% \uppercase{#1}#2} - -\def\fc@CaseIden#1\@nil{% +\gdef\fc@CaseIden#1\@nil{% #1% -} -\def\fc@UpperCaseAll#1\@nil{% +}% +\gdef\fc@UpperCaseAll#1\@nil{% \uppercase{#1}% +}% +\global\let\fc@wcase\fc@CaseIden +\global\let\fc@gcase\fc@CaseIden +\gdef\fc@apply@gcase{% + \protected@edef\@tempa{\@tempa}% + \protected@edef\@tempa{\expandafter\fc@gcase\@tempa\@nil}% } - -\let\fc@case\fc@CaseIden - \newcommand*{\@ordinalMfrench}[2]{% \iffmtord@abbrv \ifnum#1=1 % @@ -207,6 +220,7 @@ \protected@edef#2{\number#1\relax\noexpand\fmtord{\protect\`eme}}% \fi \fi} +\global\let\@ordinalMfrench\@ordinalMfrench \newcommand*{\@ordinalFfrench}[2]{% \iffmtord@abbrv \ifnum#1=1 % @@ -223,9 +237,10 @@ \protected@edef#2{\number#1\relax\noexpand\fmtord{\protect\`eme}}% \fi \fi} -\let\@ordinalNfrench\@ordinalMfrench +\global\let\@ordinalFfrench\@ordinalFfrench +\global\let\@ordinalNfrench\@ordinalMfrench \newcommand*{\@@unitstringfrench}[1]{% -\noexpand\fc@case +\noexpand\fc@wcase \ifcase#1 % z\'ero% \or un% @@ -239,9 +254,10 @@ z\'ero% \or neuf% \fi \noexpand\@nil -} +}% +\global\let\@@unitstringfrench\@@unitstringfrench \newcommand*{\@@tenstringfrench}[1]{% -\noexpand\fc@case +\noexpand\fc@wcase \ifcase#1 % \or dix% \or vingt% @@ -255,9 +271,10 @@ z\'ero% \or cent% \fi \noexpand\@nil -} +}% +\global\let\@@tenstringfrench\@@tenstringfrench \newcommand*{\@@teenstringfrench}[1]{% -\noexpand\fc@case +\noexpand\fc@wcase \ifcase#1 % dix% \or onze% @@ -266,12 +283,13 @@ z\'ero% \or quatorze% \or quinze% \or seize% -\or dix\noexpand\@nil-\noexpand\fc@case sept% -\or dix\noexpand\@nil-\noexpand\fc@case huit% -\or dix\noexpand\@nil-\noexpand\fc@case neuf% +\or dix\noexpand\@nil-\noexpand\fc@wcase sept% +\or dix\noexpand\@nil-\noexpand\fc@wcase huit% +\or dix\noexpand\@nil-\noexpand\fc@wcase neuf% \fi \noexpand\@nil -} +}% +\global\let\@@teenstringfrench\@@teenstringfrench \newcommand*{\@@seventiesfrench}[1]{% \@tenstring{6}% \ifnum#1=1 % @@ -280,9 +298,10 @@ z\'ero% -% \fi \@teenstring{#1}% -} +}% +\global\let\@@seventiesfrench\@@seventiesfrench \newcommand*\@@eightiesfrench[1]{% -\fc@case quatre\@nil-\noexpand\fc@case vingt% +\fc@wcase quatre\@nil-\noexpand\fc@wcase vingt% \ifnum#1>0 % \ifnum\fc@frenchoptions@vingt@plural=0 % vingt plural=always s% @@ -321,269 +340,302 @@ z\'ero% \fi \noexpand\@nil \fi -} +}% +\global\let\@@eightiesfrench\@@eightiesfrench \newcommand*{\@@ninetiesfrench}[1]{% -\fc@case quatre\@nil-\noexpand\fc@case vingt% +\fc@wcase quatre\@nil-\noexpand\fc@wcase vingt% \ifnum\fc@frenchoptions@vingt@plural=0 % vingt plural=always s% \fi \noexpand\@nil -\@teenstring{#1}% -} +}% +\global\let\@@ninetiesfrench\@@ninetiesfrench \newcommand*{\@@seventiesfrenchswiss}[1]{% \@tenstring{7}% \ifnum#1=1\ \@andname\ \fi \ifnum#1>1-\fi \ifnum#1>0 \@unitstring{#1}\fi -} +}% +\global\let\@@seventiesfrenchswiss\@@seventiesfrenchswiss \newcommand*{\@@eightiesfrenchswiss}[1]{% \@tenstring{8}% \ifnum#1=1\ \@andname\ \fi \ifnum#1>1-\fi \ifnum#1>0 \@unitstring{#1}\fi -} +}% +\global\let\@@eightiesfrenchswiss\@@eightiesfrenchswiss \newcommand*{\@@ninetiesfrenchswiss}[1]{% \@tenstring{9}% \ifnum#1=1\ \@andname\ \fi \ifnum#1>1-\fi \ifnum#1>0 \@unitstring{#1}\fi -} +}% +\global\let\@@ninetiesfrenchswiss\@@ninetiesfrenchswiss \newcommand*\fc@french@common{% + \let\fc@wcase\fc@CaseIden \let\@unitstring=\@@unitstringfrench \let\@teenstring=\@@teenstringfrench \let\@tenstring=\@@tenstringfrench \def\@hundred{cent}% \def\@andname{et}% -} -\DeclareRobustCommand{\@numberstringMfrenchswiss}[2]{% -\let\fc@case\fc@CaseIden +}% +\global\let\fc@french@common\fc@french@common +\newcommand*{\@numberstringMfrenchswiss}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrenchswiss \let\@nineties=\@@ninetiesfrenchswiss \let\fc@nbrstr@preamble\@empty \let\fc@nbrstr@postamble\@empty \@@numberstringfrench{#1}{#2}} -\DeclareRobustCommand{\@numberstringMfrenchfrance}[2]{% -\let\fc@case\fc@CaseIden +\global\let\@numberstringMfrenchswiss\@numberstringMfrenchswiss +\newcommand*{\@numberstringMfrenchfrance}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \let\fc@nbrstr@preamble\@empty \let\fc@nbrstr@postamble\@empty \@@numberstringfrench{#1}{#2}} -\DeclareRobustCommand{\@numberstringMfrenchbelgian}[2]{% -\let\fc@case\fc@CaseIden +\global\let\@numberstringMfrenchfrance\@numberstringMfrenchfrance +\newcommand*{\@numberstringMfrenchbelgian}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \let\fc@nbrstr@preamble\@empty \let\fc@nbrstr@postamble\@empty \@@numberstringfrench{#1}{#2}} +\global\let\@numberstringMfrenchbelgian\@numberstringMfrenchbelgian \let\@numberstringMfrench=\@numberstringMfrenchfrance -\DeclareRobustCommand{\@numberstringFfrenchswiss}[2]{% -\let\fc@case\fc@CaseIden +\newcommand*{\@numberstringFfrenchswiss}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrenchswiss \let\@nineties=\@@ninetiesfrenchswiss \let\fc@nbrstr@preamble\fc@@nbrstr@Fpreamble \let\fc@nbrstr@postamble\@empty \@@numberstringfrench{#1}{#2}} -\DeclareRobustCommand{\@numberstringFfrenchfrance}[2]{% -\let\fc@case\fc@CaseIden +\global\let\@numberstringFfrenchswiss\@numberstringFfrenchswiss +\newcommand*{\@numberstringFfrenchfrance}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \let\fc@nbrstr@preamble\fc@@nbrstr@Fpreamble \let\fc@nbrstr@postamble\@empty \@@numberstringfrench{#1}{#2}} -\DeclareRobustCommand{\@numberstringFfrenchbelgian}[2]{% -\let\fc@case\fc@CaseIden +\global\let\@numberstringFfrenchfrance\@numberstringFfrenchfrance +\newcommand*{\@numberstringFfrenchbelgian}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \let\fc@nbrstr@preamble\fc@@nbrstr@Fpreamble \let\fc@nbrstr@postamble\@empty \@@numberstringfrench{#1}{#2}} -\let\@numberstringFfrench=\@numberstringFfrenchfrance -\let\@ordinalstringNfrench\@ordinalstringMfrench -\DeclareRobustCommand{\@NumberstringMfrenchswiss}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter +\global\let\@numberstringFfrenchbelgian\@numberstringFfrenchbelgian +\global\let\@numberstringFfrench=\@numberstringFfrenchfrance +\global\let\@ordinalstringNfrench\@ordinalstringMfrench +\newcommand*{\@NumberstringMfrenchswiss}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrenchswiss \let\@nineties=\@@ninetiesfrenchswiss \let\fc@nbrstr@preamble\@empty -\let\fc@nbrstr@postamble\@empty +\let\fc@nbrstr@postamble\fc@apply@gcase \@@numberstringfrench{#1}{#2}} -\DeclareRobustCommand{\@NumberstringMfrenchfrance}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter +\global\let\@NumberstringMfrenchswiss\@NumberstringMfrenchswiss +\newcommand*{\@NumberstringMfrenchfrance}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \let\fc@nbrstr@preamble\@empty -\let\fc@nbrstr@postamble\@empty +\let\fc@nbrstr@postamble\fc@apply@gcase \@@numberstringfrench{#1}{#2}} -\DeclareRobustCommand{\@NumberstringMfrenchbelgian}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter +\global\let\@NumberstringMfrenchfrance\@NumberstringMfrenchfrance +\newcommand*{\@NumberstringMfrenchbelgian}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \let\fc@nbrstr@preamble\@empty -\let\fc@nbrstr@postamble\@empty +\let\fc@nbrstr@postamble\fc@apply@gcase \@@numberstringfrench{#1}{#2}} -\let\@NumberstringMfrench=\@NumberstringMfrenchfrance -\DeclareRobustCommand{\@NumberstringFfrenchswiss}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter +\global\let\@NumberstringMfrenchbelgian\@NumberstringMfrenchbelgian +\global\let\@NumberstringMfrench=\@NumberstringMfrenchfrance +\newcommand*{\@NumberstringFfrenchswiss}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrenchswiss \let\@nineties=\@@ninetiesfrenchswiss \let\fc@nbrstr@preamble\fc@@nbrstr@Fpreamble -\let\fc@nbrstr@postamble\@empty +\let\fc@nbrstr@postamble\fc@apply@gcase \@@numberstringfrench{#1}{#2}} -\DeclareRobustCommand{\@NumberstringFfrenchfrance}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter +\global\let\@NumberstringFfrenchswiss\@NumberstringFfrenchswiss +\newcommand*{\@NumberstringFfrenchfrance}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \let\fc@nbrstr@preamble\fc@@nbrstr@Fpreamble -\let\fc@nbrstr@postamble\@empty +\let\fc@nbrstr@postamble\fc@apply@gcase \@@numberstringfrench{#1}{#2}} -\DeclareRobustCommand{\@NumberstringFfrenchbelgian}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter +\global\let\@NumberstringFfrenchfrance\@NumberstringFfrenchfrance +\newcommand*{\@NumberstringFfrenchbelgian}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \let\fc@nbrstr@preamble\fc@@nbrstr@Fpreamble -\let\fc@nbrstr@postamble\@empty +\let\fc@nbrstr@postamble\fc@apply@gcase \@@numberstringfrench{#1}{#2}} -\let\@NumberstringFfrench=\@NumberstringFfrenchfrance -\let\@NumberstringNfrench\@NumberstringMfrench -\DeclareRobustCommand{\@ordinalstringMfrenchswiss}[2]{% -\let\fc@case\fc@CaseIden -\let\fc@first=\fc@@firstfrench +\global\let\@NumberstringFfrenchbelgian\@NumberstringFfrenchbelgian +\global\let\@NumberstringFfrench=\@NumberstringFfrenchfrance +\global\let\@NumberstringNfrench\@NumberstringMfrench +\newcommand*{\@ordinalstringMfrenchswiss}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden +\let\fc@first\fc@@firstfrench \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrenchswiss \let\@nineties=\@@ninetiesfrenchswiss \@@ordinalstringfrench{#1}{#2}% -} +}% +\global\let\@ordinalstringMfrenchswiss\@ordinalstringMfrenchswiss \newcommand*\fc@@firstfrench{premier} +\global\let\fc@@firstfrench\fc@@firstfrench \newcommand*\fc@@firstFfrench{premi\protect\`ere} -\DeclareRobustCommand{\@ordinalstringMfrenchfrance}[2]{% -\let\fc@case\fc@CaseIden -\let\fc@first=\fc@@firstfrench +\global\let\fc@@firstFfrench\fc@@firstFfrench +\newcommand*{\@ordinalstringMfrenchfrance}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden +\let\fc@first=\fc@@firstfrench \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \@@ordinalstringfrench{#1}{#2}} -\DeclareRobustCommand{\@ordinalstringMfrenchbelgian}[2]{% -\let\fc@case\fc@CaseIden -\let\fc@first=\fc@@firstfrench +\global\let\@ordinalstringMfrenchfrance\@ordinalstringMfrenchfrance +\newcommand*{\@ordinalstringMfrenchbelgian}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden +\let\fc@first=\fc@@firstfrench \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \@@ordinalstringfrench{#1}{#2}% -} -\let\@ordinalstringMfrench=\@ordinalstringMfrenchfrance -\DeclareRobustCommand{\@ordinalstringFfrenchswiss}[2]{% -\let\fc@case\fc@CaseIden -\let\fc@first=\fc@@firstFfrench +}% +\global\let\@ordinalstringMfrenchbelgian\@ordinalstringMfrenchbelgian +\global\let\@ordinalstringMfrench=\@ordinalstringMfrenchfrance +\newcommand*{\@ordinalstringFfrenchswiss}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden +\let\fc@first\fc@@firstFfrench \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrenchswiss \let\@nineties=\@@ninetiesfrenchswiss \@@ordinalstringfrench{#1}{#2}% -} -\DeclareRobustCommand{\@ordinalstringFfrenchfrance}[2]{% -\let\fc@case\fc@CaseIden -\let\fc@first=\fc@@firstFfrench +}% +\global\let\@ordinalstringFfrenchswiss\@ordinalstringFfrenchswiss +\newcommand*{\@ordinalstringFfrenchfrance}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden +\let\fc@first=\fc@@firstFfrench \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \@@ordinalstringfrench{#1}{#2}% -} -\DeclareRobustCommand{\@ordinalstringFfrenchbelgian}[2]{% -\let\fc@case\fc@CaseIden -\let\fc@first=\fc@@firstFfrench +}% +\global\let\@ordinalstringFfrenchfrance\@ordinalstringFfrenchfrance +\newcommand*{\@ordinalstringFfrenchbelgian}[2]{% \fc@french@common +\let\fc@gcase\fc@CaseIden +\let\fc@first=\fc@@firstFfrench \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \@@ordinalstringfrench{#1}{#2}% -} -\let\@ordinalstringFfrench=\@ordinalstringFfrenchfrance -\let\@ordinalstringNfrench\@ordinalstringMfrench -\DeclareRobustCommand{\@OrdinalstringMfrenchswiss}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter -\let\fc@first=\fc@@firstfrench +}% +\global\let\@ordinalstringFfrenchbelgian\@ordinalstringFfrenchbelgian +\global\let\@ordinalstringFfrench=\@ordinalstringFfrenchfrance +\global\let\@ordinalstringNfrench\@ordinalstringMfrench +\newcommand*{\@OrdinalstringMfrenchswiss}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter +\let\fc@first=\fc@@firstfrench \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrenchswiss \let\@nineties=\@@ninetiesfrenchswiss \@@ordinalstringfrench{#1}{#2}% -} -\DeclareRobustCommand{\@OrdinalstringMfrenchfrance}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter -\let\fc@first=\fc@@firstfrench +}% +\global\let\@OrdinalstringMfrenchswiss\@OrdinalstringMfrenchswiss +\newcommand*{\@OrdinalstringMfrenchfrance}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter +\let\fc@first\fc@@firstfrench \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \@@ordinalstringfrench{#1}{#2}% -} -\DeclareRobustCommand{\@OrdinalstringMfrenchbelgian}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter -\let\fc@first=\fc@@firstfrench +}% +\global\let\@OrdinalstringMfrenchfrance\@OrdinalstringMfrenchfrance +\newcommand*{\@OrdinalstringMfrenchbelgian}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter +\let\fc@first\fc@@firstfrench \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \@@ordinalstringfrench{#1}{#2}% -} -\let\@OrdinalstringMfrench=\@OrdinalstringMfrenchfrance -\DeclareRobustCommand{\@OrdinalstringFfrenchswiss}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter -\let\fc@first=\fc@@firstfrench +}% +\global\let\@OrdinalstringMfrenchbelgian\@OrdinalstringMfrenchbelgian +\global\let\@OrdinalstringMfrench=\@OrdinalstringMfrenchfrance +\newcommand*{\@OrdinalstringFfrenchswiss}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter +\let\fc@first\fc@@firstfrench \let\@seventies=\@@seventiesfrenchswiss \let\@eighties=\@@eightiesfrenchswiss \let\@nineties=\@@ninetiesfrenchswiss \@@ordinalstringfrench{#1}{#2}% -} -\DeclareRobustCommand{\@OrdinalstringFfrenchfrance}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter -\let\fc@first=\fc@@firstFfrench +}% +\global\let\@OrdinalstringFfrenchswiss\@OrdinalstringFfrenchswiss +\newcommand*{\@OrdinalstringFfrenchfrance}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter +\let\fc@first\fc@@firstFfrench \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \@@ordinalstringfrench{#1}{#2}% -} -\DeclareRobustCommand{\@OrdinalstringFfrenchbelgian}[2]{% -\let\fc@case\fc@UpperCaseFirstLetter -\let\fc@first=\fc@@firstFfrench +}% +\global\let\@OrdinalstringFfrenchfrance\@OrdinalstringFfrenchfrance +\newcommand*{\@OrdinalstringFfrenchbelgian}[2]{% \fc@french@common +\let\fc@gcase\fc@UpperCaseFirstLetter +\let\fc@first\fc@@firstFfrench \let\@seventies=\@@seventiesfrench \let\@eighties=\@@eightiesfrench \let\@nineties=\@@ninetiesfrench \@@ordinalstringfrench{#1}{#2}% -} -\let\@OrdinalstringFfrench=\@OrdinalstringFfrenchfrance -\let\@OrdinalstringNfrench\@OrdinalstringMfrench +}% +\global\let\@OrdinalstringFfrenchbelgian\@OrdinalstringFfrenchbelgian +\global\let\@OrdinalstringFfrench=\@OrdinalstringFfrenchfrance +\global\let\@OrdinalstringNfrench\@OrdinalstringMfrench \ifcsundef{fc@@do@plural@mark}{}% {\PackageError{fmtcount}{Duplicate definition}{Redefinition of macro `fc@@do@plural@mark'}} @@ -624,28 +676,31 @@ z\'ero% \fi \fi \fi -} +}% +\global\let\fc@@do@plural@mark\fc@@do@plural@mark \ifcsundef{fc@@nbrstr@Fpreamble}{}{% \PackageError{fmtcount}{Duplicate definition}{Redefinition of macro `fc@@nbrstr@Fpreamble'}} \def\fc@@nbrstr@Fpreamble{% \fc@read@unit{\count1}{0}% \ifnum\count1=1 % - \let\fc@case@save\fc@case - \def\fc@case{\noexpand\fc@case}% + \let\fc@wcase@save\fc@wcase + \def\fc@wcase{\noexpand\fc@wcase}% \def\@nil{\noexpand\@nil}% \let\fc@nbrstr@postamble\fc@@nbrstr@Fpostamble \fi -} +}% +\global\let\fc@@nbrstr@Fpreamble\fc@@nbrstr@Fpreamble \def\fc@@nbrstr@Fpostamble{% - \let\fc@case\fc@case@save + \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@case une\@nil}% + \edef\@tempa{\@tempb\fc@wcase une\@nil}% \fi -} +}% +\global\let\fc@@nbrstr@Fpostamble\fc@@nbrstr@Fpostamble \ifcsundef{fc@@pot@longscalefrench}{}{% \PackageError{fmtcount}{Duplicate definition}{Redefinition of macro `fc@@pot@longscalefrench'}} @@ -683,7 +738,7 @@ z\'ero% \ifnum\@temph=1 % \count10=\fc@frenchoptions@mil@plural\space \edef\@tempe{% - \noexpand\fc@case + \noexpand\fc@wcase mil% \fc@@do@plural@mark\fc@frenchoptions@mil@plural@mark \noexpand\@nil @@ -700,7 +755,7 @@ z\'ero% \count10=\csname fc@frenchoptions@n-illion@plural\endcsname\space \fi \edef\@tempe{% - \noexpand\fc@case + \noexpand\fc@wcase \@tempg \the\toks10 % \fc@@do@plural@mark s% @@ -720,7 +775,8 @@ z\'ero% \edef\@tempa{\the\toks0 \@temph \def\noexpand#3{\the\toks1}}% \expandafter }\@tempa -} +}% +\global\let\fc@@pot@longscalefrench\fc@@pot@longscalefrench \ifcsundef{fc@@pot@shortscalefrench}{}{% \PackageError{fmtcount}{Duplicate definition}{Redefinition of macro `fc@@pot@shortscalefrench'}} @@ -746,7 +802,7 @@ z\'ero% \expandafter\fc@@latin@cardinal@pefix\expandafter{\the\count2}\@tempg \count10=\csname fc@frenchoptions@n-illion@plural\endcsname\space \edef\@tempe{% - \noexpand\fc@case + \noexpand\fc@wcase \@tempg illion% \fc@@do@plural@mark s% @@ -766,7 +822,8 @@ z\'ero% \edef\@tempa{\the\toks0 \@temph \def\noexpand#3{\the\toks1}}% \expandafter }\@tempa -} +}% +\global\let\fc@@pot@shortscalefrench\fc@@pot@shortscalefrench \ifcsundef{fc@@pot@recursivefrench}{}{% \PackageError{fmtcount}{Duplicate definition}{Redefinition of macro `fc@@pot@recursivefrench'}} @@ -781,7 +838,7 @@ z\'ero% \advance\count2 by -1 % \let\@tempe\@empty \edef\@tempf{\fc@frenchoptions@supermillion@dos - de\fc@frenchoptions@supermillion@dos\fc@case milliards\@nil}% + de\fc@frenchoptions@supermillion@dos\fc@wcase milliards\@nil}% \count11\count0 % \ifnum\count2>0 % \count3\count2 % @@ -838,16 +895,16 @@ z\'ero% \or mil\fc@@do@plural@mark\fc@frenchoptions@mil@plural@mark \noexpand\@nil\fc@frenchoptions@supermillion@dos - \noexpand\fc@case milliards% 4 + \noexpand\fc@wcase milliards% 4 \or million\fc@@do@plural@mark s% \noexpand\@nil\fc@frenchoptions@supermillion@dos - de\fc@frenchoptions@supermillion@dos\noexpand\fc@case milliards% 5 + de\fc@frenchoptions@supermillion@dos\noexpand\fc@wcase milliards% 5 \fi }% \edef\@tempe{% \ifx\@tempf\@empty\else - \expandafter\fc@case\@tempf\@nil + \expandafter\fc@wcase\@tempf\@nil \fi \@tempg }% @@ -860,7 +917,8 @@ z\'ero% \edef\@tempa{\the\toks0 \@temph \def\noexpand#3{\the\toks1}}% \expandafter }\@tempa -} +}% +\global\let\fc@@pot@recursivefrench\fc@@pot@recursivefrench \ifcsundef{fc@muladdfrench}{}{% \PackageError{fmtcount}{Duplicate definition}{Redefinition of macro `fc@muladdfrench'}} @@ -909,6 +967,7 @@ z\'ero% \expandafter }\@tempa }% +\global\let\fc@muladdfrench\fc@muladdfrench \ifcsundef{fc@lthundredstringfrench}{}{% \PackageError{fmtcount}{Duplicate definition}{Redefinition of macro `fc@lthundredstringfrench'}} @@ -978,7 +1037,8 @@ z\'ero% \expandafter\@tempb\expandafter{\@tempa}% \expandafter }\@tempa -} +}% +\global\let\fc@lthundredstringfrench\fc@lthundredstringfrench \ifcsundef{fc@ltthousandstringfrench}{}{% \PackageError{fmtcount}{Duplicate definition}{Redefinition of macro `fc@ltthousandstringfrench'}} @@ -1016,10 +1076,10 @@ z\'ero% \ifnum\count2=0 % \else \ifnum\count2=1 % - \expandafter\fc@case\@hundred\@nil + \expandafter\fc@wcase\@hundred\@nil \else \@unitstring{\count2}\fc@frenchoptions@submillion@dos - \noexpand\fc@case\@hundred\@temps\noexpand\@nil + \noexpand\fc@wcase\@hundred\@temps\noexpand\@nil \fi \@tempb \fi @@ -1030,7 +1090,8 @@ z\'ero% \expandafter\@tempb\expandafter{\@tempa}% \expandafter }\@tempa -} +}% +\global\let\fc@ltthousandstringfrench\fc@ltthousandstringfrench \ifcsundef{@@numberstringfrench}{}{% \PackageError{fmtcount}{Duplicate definition}{Redefinition of macro `@@numberstringfrench'}} \def\@@numberstringfrench#1#2{% @@ -1041,7 +1102,7 @@ z\'ero% \PackageError{fmtcount}{Out of range}% {This macro does not work with fractional numbers}% \fi - \edef\@tempa{\ifcase\fc@sign@case\space\or\fc@case plus\@nil\or\fc@case moins\@nil\fi}% + \edef\@tempa{\ifcase\fc@sign@case\space\or\fc@wcase plus\@nil\or\fc@wcase moins\@nil\fi}% \fc@nbrstr@preamble \fc@@nbrstrfrench@inner \fc@nbrstr@postamble @@ -1049,7 +1110,8 @@ z\'ero% \expandafter\@tempb\expandafter{\@tempa}% \expandafter }\@tempa -} +}% +\global\let\@@numberstringfrench\@@numberstringfrench \def\fc@@nbrstrfrench@inner{% \count0=\fc@max@weight \divide\count0 by 3 % @@ -1070,7 +1132,8 @@ z\'ero% \advance\count0 by -3 % \ifnum\count6>\count0 \else \repeat -} +}% +\global\let\fc@@nbrstrfrench@inner\fc@@nbrstrfrench@inner \ifcsundef{@@ordinalstringfrench}{}{% \PackageError{fmtcount}{Duplicate definition}{Redefinition of macro `@@ordinalstringfrench'}} @@ -1096,7 +1159,7 @@ z\'ero% \count0=0 % \fi \ifnum\count0=1 % - \protected@edef\@tempa{\expandafter\fc@case\fc@first\@nil}% + \protected@edef\@tempa{\expandafter\fc@wcase\fc@first\@nil}% \else \def\@tempa##1{% \expandafter\edef\csname fc@frenchoptions@##1@plural\endcsname{% @@ -1122,55 +1185,62 @@ z\'ero% \@tempa{mil}% \@tempa{n-illion}% \@tempa{n-illiard}% - \let\fc@case@save\fc@case - \def\fc@case{\noexpand\fc@case}% + \let\fc@wcase@save\fc@wcase + \def\fc@wcase{\noexpand\fc@wcase}% \def\@nil{\noexpand\@nil}% \let\@tempa\@empty \fc@@nbrstrfrench@inner - \let\fc@case\fc@case@save + \let\fc@wcase\fc@wcase@save \expandafter\fc@get@last@word\expandafter{\@tempa}\@tempb\@tempc \expandafter\fc@get@last@letter\expandafter{\@tempc}\@tempd\@tempe \def\@tempf{e}% \ifx\@tempe\@tempf - \protected@edef\@tempa{\@tempb\expandafter\fc@case\@tempd i\protect\`eme\@nil}% + \protected@edef\@tempa{\@tempb\expandafter\fc@wcase\@tempd i\protect\`eme\@nil}% \else \def\@tempf{q}% \ifx\@tempe\@tempf - \protected@edef\@tempa{\@tempb\expandafter\fc@case\@tempd qui\protect\`eme\@nil}% + \protected@edef\@tempa{\@tempb\expandafter\fc@wcase\@tempd qui\protect\`eme\@nil}% \else \def\@tempf{f}% \ifx\@tempe\@tempf - \protected@edef\@tempa{\@tempb\expandafter\fc@case\@tempd vi\protect\`eme\@nil}% + \protected@edef\@tempa{\@tempb\expandafter\fc@wcase\@tempd vi\protect\`eme\@nil}% \else - \protected@edef\@tempa{\@tempb\expandafter\fc@case\@tempc i\protect\`eme\@nil}% + \protected@edef\@tempa{\@tempb\expandafter\fc@wcase\@tempc i\protect\`eme\@nil}% \fi \fi \fi \fi + \fc@apply@gcase \def\@tempb##1{\def\@tempa{\def#2{##1}}}% \expandafter\@tempb\expandafter{\@tempa}% \expandafter }\@tempa -} +}% +\global\let\@@ordinalstringfrench\@@ordinalstringfrench \newcommand*\fc@frenchoptions@setdefaults{% \csname KV@fcfrench@all plural\endcsname{reformed}% - \def\fc@frenchoptions@submillion@dos{-}% - \let\fc@frenchoptions@supermillion@dos\space - \let\fc@u@in@duo\@empty% Could be `u' - % \let\fc@poweroften\fc@@pot@longscalefrench - \let\fc@poweroften\fc@@pot@recursivefrench - \def\fc@longscale@nilliard@upto{0}% infinity - \def\fc@frenchoptions@mil@plural@mark{le}% -} -\fc@frenchoptions@setdefaults -\def\@ordinalstringMfrench{\csuse{@ordinalstringMfrench\fmtcount@french}}% -\def\@ordinalstringFfrench{\csuse{@ordinalstringFfrench\fmtcount@french}}% -\def\@OrdinalstringMfrench{\csuse{@OrdinalstringMfrench\fmtcount@french}}% -\def\@OrdinalstringFfrench{\csuse{@OrdinalstringFfrench\fmtcount@french}}% -\def\@numberstringMfrench{\csuse{@numberstringMfrench\fmtcount@french}}% -\def\@numberstringFfrench{\csuse{@numberstringFfrench\fmtcount@french}}% -\def\@NumberstringMfrench{\csuse{@NumberstringMfrench\fmtcount@french}}% -\def\@NumberstringFfrench{\csuse{@NumberstringFfrench\fmtcount@french}}% + \fc@gl@def\fc@frenchoptions@submillion@dos{-}% + \fc@gl@let\fc@frenchoptions@supermillion@dos\space + \fc@gl@let\fc@u@in@duo\@empty% Could be `u' + % \fc@gl@let\fc@poweroften\fc@@pot@longscalefrench + \fc@gl@let\fc@poweroften\fc@@pot@recursivefrench + \fc@gl@def\fc@longscale@nilliard@upto{0}% infinity + \fc@gl@def\fc@frenchoptions@mil@plural@mark{le}% +}% +\global\let\fc@frenchoptions@setdefaults\fc@frenchoptions@setdefaults +{% + \let\fc@gl@def\gdef + \def\fc@gl@let{\global\let}% + \fc@frenchoptions@setdefaults +}% +\gdef\@ordinalstringMfrench{\csuse{@ordinalstringMfrench\fmtcount@french}}% +\gdef\@ordinalstringFfrench{\csuse{@ordinalstringFfrench\fmtcount@french}}% +\gdef\@OrdinalstringMfrench{\csuse{@OrdinalstringMfrench\fmtcount@french}}% +\gdef\@OrdinalstringFfrench{\csuse{@OrdinalstringFfrench\fmtcount@french}}% +\gdef\@numberstringMfrench{\csuse{@numberstringMfrench\fmtcount@french}}% +\gdef\@numberstringFfrench{\csuse{@numberstringFfrench\fmtcount@french}}% +\gdef\@NumberstringMfrench{\csuse{@NumberstringMfrench\fmtcount@french}}% +\gdef\@NumberstringFfrench{\csuse{@NumberstringFfrench\fmtcount@french}}% \iffalse Local variables: \fi \iffalse mode: docTeX \fi \iffalse End: \fi diff --git a/Master/texmf-dist/tex/latex/fmtcount/fc-frenchb.def b/Master/texmf-dist/tex/latex/fmtcount/fc-frenchb.def index 026b4e50437..ca15d437f03 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fc-frenchb.def +++ b/Master/texmf-dist/tex/latex/fmtcount/fc-frenchb.def @@ -7,7 +7,7 @@ %% fmtcount.dtx (with options: `fc-frenchb.def,package') %% %% fmtcount.dtx -%% Copyright 2015 Nicola Talbot and Vincent Belaïche +%% Copyright 2017 Nicola Talbot and Vincent Belaïche %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/fmtcount/fc-german.def b/Master/texmf-dist/tex/latex/fmtcount/fc-german.def index 3f0d859f0fc..20871edb6c0 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fc-german.def +++ b/Master/texmf-dist/tex/latex/fmtcount/fc-german.def @@ -7,7 +7,7 @@ %% fmtcount.dtx (with options: `fc-german.def,package') %% %% fmtcount.dtx -%% Copyright 2015 Nicola Talbot and Vincent Belaïche +%% Copyright 2017 Nicola Talbot and Vincent Belaïche %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -51,7 +51,7 @@ %% Local Variables: %% coding: utf-8 %% End: -\ProvidesFCLanguage{german}[2014/06/09]% +\ProvidesFCLanguage{german}[2016/01/12]% \newcommand{\@ordinalMgerman}[2]{% \edef#2{\number#1\relax.}% }% @@ -113,7 +113,7 @@ \fi }% \global\let\@@teenstringgerman\@@teenstringgerman -\DeclareRobustCommand{\@numberstringMgerman}[2]{% +\newcommand*{\@numberstringMgerman}[2]{% \let\@unitstring=\@@unitstringgerman \let\@teenstring=\@@teenstringgerman \let\@tenstring=\@@tenstringgerman @@ -122,14 +122,14 @@ \global\let\@numberstringMgerman\@numberstringMgerman \global\let\@numberstringFgerman=\@numberstringMgerman \global\let\@numberstringNgerman=\@numberstringMgerman -\DeclareRobustCommand{\@NumberstringMgerman}[2]{% +\newcommand*{\@NumberstringMgerman}[2]{% \@numberstringMgerman{#1}{\@@num@str}% \edef#2{\noexpand\MakeUppercase\expandonce\@@num@str}% }% \global\let\@NumberstringMgerman\@NumberstringMgerman \global\let\@NumberstringFgerman=\@NumberstringMgerman \global\let\@NumberstringNgerman=\@NumberstringMgerman -\DeclareRobustCommand{\@ordinalstringMgerman}[2]{% +\newcommand*{\@ordinalstringMgerman}[2]{% \let\@unitthstring=\@@unitthstringMgerman \let\@teenthstring=\@@teenthstringMgerman \let\@tenthstring=\@@tenthstringMgerman @@ -141,7 +141,7 @@ \@@ordinalstringgerman{#1}{#2}% }% \global\let\@ordinalstringMgerman\@ordinalstringMgerman -\DeclareRobustCommand{\@ordinalstringFgerman}[2]{% +\newcommand*{\@ordinalstringFgerman}[2]{% \let\@unitthstring=\@@unitthstringFgerman \let\@teenthstring=\@@teenthstringFgerman \let\@tenthstring=\@@tenthstringFgerman @@ -153,7 +153,7 @@ \@@ordinalstringgerman{#1}{#2}% }% \global\let\@ordinalstringFgerman\@ordinalstringFgerman -\DeclareRobustCommand{\@ordinalstringNgerman}[2]{% +\newcommand*{\@ordinalstringNgerman}[2]{% \let\@unitthstring=\@@unitthstringNgerman \let\@teenthstring=\@@teenthstringNgerman \let\@tenthstring=\@@tenthstringNgerman @@ -165,17 +165,17 @@ \@@ordinalstringgerman{#1}{#2}% }% \global\let\@ordinalstringNgerman\@ordinalstringNgerman -\DeclareRobustCommand{\@OrdinalstringMgerman}[2]{% +\newcommand*{\@OrdinalstringMgerman}[2]{% \@ordinalstringMgerman{#1}{\@@num@str}% \edef#2{\noexpand\MakeUppercase\expandonce\@@num@str}% }% \global\let\@OrdinalstringMgerman\@OrdinalstringMgerman -\DeclareRobustCommand{\@OrdinalstringFgerman}[2]{% +\newcommand*{\@OrdinalstringFgerman}[2]{% \@ordinalstringFgerman{#1}{\@@num@str}% \edef#2{\noexpand\MakeUppercase\expandonce\@@num@str}% }% \global\let\@OrdinalstringFgerman\@OrdinalstringFgerman -\DeclareRobustCommand{\@OrdinalstringNgerman}[2]{% +\newcommand*{\@OrdinalstringNgerman}[2]{% \@ordinalstringNgerman{#1}{\@@num@str}% \edef#2{\noexpand\MakeUppercase\expandonce\@@num@str}% }% @@ -470,7 +470,9 @@ }% \global\let\@@ordinalstringgerman\@@ordinalstringgerman \FCloadlang{germanb}% - +\iffalse Local variables: \fi +\iffalse mode: docTeX \fi +\iffalse End: \fi \endinput %% %% End of file `fc-german.def'. diff --git a/Master/texmf-dist/tex/latex/fmtcount/fc-germanb.def b/Master/texmf-dist/tex/latex/fmtcount/fc-germanb.def index 3b3bdc4460c..0f83e97d690 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fc-germanb.def +++ b/Master/texmf-dist/tex/latex/fmtcount/fc-germanb.def @@ -7,7 +7,7 @@ %% fmtcount.dtx (with options: `fc-germanb.def,package') %% %% fmtcount.dtx -%% Copyright 2015 Nicola Talbot and Vincent Belaïche +%% Copyright 2017 Nicola Talbot and Vincent Belaïche %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/fmtcount/fc-italian.def b/Master/texmf-dist/tex/latex/fmtcount/fc-italian.def index 22a43458001..3f05150b763 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fc-italian.def +++ b/Master/texmf-dist/tex/latex/fmtcount/fc-italian.def @@ -7,7 +7,7 @@ %% fmtcount.dtx (with options: `fc-italian.def,package') %% %% fmtcount.dtx -%% Copyright 2015 Nicola Talbot and Vincent Belaïche +%% Copyright 2017 Nicola Talbot and Vincent Belaïche %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/fmtcount/fc-ngerman.def b/Master/texmf-dist/tex/latex/fmtcount/fc-ngerman.def index c9d38dd6604..52491b78ac0 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fc-ngerman.def +++ b/Master/texmf-dist/tex/latex/fmtcount/fc-ngerman.def @@ -7,7 +7,7 @@ %% fmtcount.dtx (with options: `fc-ngerman.def,package') %% %% fmtcount.dtx -%% Copyright 2015 Nicola Talbot and Vincent Belaïche +%% Copyright 2017 Nicola Talbot and Vincent Belaïche %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/fmtcount/fc-ngermanb.def b/Master/texmf-dist/tex/latex/fmtcount/fc-ngermanb.def index 1be2a82515d..e518b6aa18a 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fc-ngermanb.def +++ b/Master/texmf-dist/tex/latex/fmtcount/fc-ngermanb.def @@ -7,7 +7,7 @@ %% fmtcount.dtx (with options: `fc-ngermanb.def,package') %% %% fmtcount.dtx -%% Copyright 2015 Nicola Talbot and Vincent Belaïche +%% Copyright 2017 Nicola Talbot and Vincent Belaïche %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/fmtcount/fc-portuges.def b/Master/texmf-dist/tex/latex/fmtcount/fc-portuges.def index 0a4f696ef75..372515fc99f 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fc-portuges.def +++ b/Master/texmf-dist/tex/latex/fmtcount/fc-portuges.def @@ -7,7 +7,7 @@ %% fmtcount.dtx (with options: `fc-portuges.def,package') %% %% fmtcount.dtx -%% Copyright 2015 Nicola Talbot and Vincent Belaïche +%% Copyright 2017 Nicola Talbot and Vincent Belaïche %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -51,7 +51,7 @@ %% Local Variables: %% coding: utf-8 %% End: -\ProvidesFCLanguage{portuges}[2014/06/09]% +\ProvidesFCLanguage{portuges}[2016/01/12]% \newcommand*\@ordinalMportuges[2]{% \ifnum#1=0\relax \edef#2{\number#1}% @@ -245,7 +245,13 @@ \fi }% \global\let\@@HundredstringFportuges\@@HundredstringFportuges -\DeclareRobustCommand{\@numberstringMportuges}[2]{% +\cs{newcommand*} as robustness is handled now at top level in % +\texttt{fmtcount.sty}, and we don't need \cs{long} macros. Concerned % +macros are \cs{@numberstringMportuges}, \cs{@numberstringFportuges}, +\cs{@NumberstringMportuges}, \cs{@NumberstringFportuges}, +\cs{@ordinalstringMportuges}, \cs{@ordinalstringFportuges}, +\cs{@OrdinalstringMportuges}, and \cs{@OrdinalstringFportuges}.} +\newcommand*{\@numberstringMportuges}[2]{% \let\@unitstring=\@@unitstringportuges \let\@teenstring=\@@teenstringportuges \let\@tenstring=\@@tenstringportuges @@ -255,7 +261,7 @@ \@@numberstringportuges{#1}{#2}% }% \global\let\@numberstringMportuges\@numberstringMportuges -\DeclareRobustCommand{\@numberstringFportuges}[2]{% +\newcommand*{\@numberstringFportuges}[2]{% \let\@unitstring=\@@unitstringFportuges \let\@teenstring=\@@teenstringportuges \let\@tenstring=\@@tenstringportuges @@ -266,7 +272,7 @@ }% \global\let\@numberstringFportuges\@numberstringFportuges \global\let\@numberstringNportuges\@numberstringMportuges -\DeclareRobustCommand{\@NumberstringMportuges}[2]{% +\newcommand*{\@NumberstringMportuges}[2]{% \let\@unitstring=\@@Unitstringportuges \let\@teenstring=\@@Teenstringportuges \let\@tenstring=\@@Tenstringportuges @@ -276,7 +282,7 @@ \@@numberstringportuges{#1}{#2}% }% \global\let\@NumberstringMportuges\@NumberstringMportuges -\DeclareRobustCommand{\@NumberstringFportuges}[2]{% +\newcommand*{\@NumberstringFportuges}[2]{% \let\@unitstring=\@@UnitstringFportuges \let\@teenstring=\@@Teenstringportuges \let\@tenstring=\@@Tenstringportuges @@ -287,7 +293,7 @@ }% \global\let\@NumberstringFportuges\@NumberstringFportuges \global\let\@NumberstringNportuges\@NumberstringMportuges -\DeclareRobustCommand{\@ordinalstringMportuges}[2]{% +\newcommand*{\@ordinalstringMportuges}[2]{% \let\@unitthstring=\@@unitthstringportuges \let\@unitstring=\@@unitstringportuges \let\@teenthstring=\@@teenthstringportuges @@ -297,7 +303,7 @@ \@@ordinalstringportuges{#1}{#2}% }% \global\let\@ordinalstringMportuges\@ordinalstringMportuges -\DeclareRobustCommand{\@ordinalstringFportuges}[2]{% +\newcommand*{\@ordinalstringFportuges}[2]{% \let\@unitthstring=\@@unitthstringFportuges \let\@unitstring=\@@unitstringFportuges \let\@teenthstring=\@@teenthstringportuges @@ -308,7 +314,7 @@ }% \global\let\@ordinalstringFportuges\@ordinalstringFportuges \global\let\@ordinalstringNportuges\@ordinalstringMportuges -\DeclareRobustCommand{\@OrdinalstringMportuges}[2]{% +\newcommand*{\@OrdinalstringMportuges}[2]{% \let\@unitthstring=\@@Unitthstringportuges \let\@unitstring=\@@Unitstringportuges \let\@teenthstring=\@@teenthstringportuges @@ -318,7 +324,7 @@ \@@ordinalstringportuges{#1}{#2}% }% \global\let\@OrdinalstringMportuges\@OrdinalstringMportuges -\DeclareRobustCommand{\@OrdinalstringFportuges}[2]{% +\newcommand*{\@OrdinalstringFportuges}[2]{% \let\@unitthstring=\@@UnitthstringFportuges \let\@unitstring=\@@UnitstringFportuges \let\@teenthstring=\@@teenthstringportuges @@ -702,6 +708,9 @@ this number}% \fi }% \global\let\@@ordinalstringportuges\@@ordinalstringportuges +\iffalse Local variables: \fi +\iffalse mode: docTeX \fi +\iffalse End: \fi \endinput %% %% End of file `fc-portuges.def'. diff --git a/Master/texmf-dist/tex/latex/fmtcount/fc-portuguese.def b/Master/texmf-dist/tex/latex/fmtcount/fc-portuguese.def index 18bb7e9f948..262a4c6a282 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fc-portuguese.def +++ b/Master/texmf-dist/tex/latex/fmtcount/fc-portuguese.def @@ -7,7 +7,7 @@ %% fmtcount.dtx (with options: `fc-portuguese.def,package') %% %% fmtcount.dtx -%% Copyright 2015 Nicola Talbot and Vincent Belaïche +%% Copyright 2017 Nicola Talbot and Vincent Belaïche %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/fmtcount/fc-spanish.def b/Master/texmf-dist/tex/latex/fmtcount/fc-spanish.def index 3a8c9eb2b37..ddb0e1eb6e0 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fc-spanish.def +++ b/Master/texmf-dist/tex/latex/fmtcount/fc-spanish.def @@ -7,7 +7,7 @@ %% fmtcount.dtx (with options: `fc-spanish.def,package') %% %% fmtcount.dtx -%% Copyright 2015 Nicola Talbot and Vincent Belaïche +%% Copyright 2017 Nicola Talbot and Vincent Belaïche %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -51,7 +51,7 @@ %% Local Variables: %% coding: utf-8 %% End: -\ProvidesFCLanguage{spanish}[2013/08/17]% +\ProvidesFCLanguage{spanish}[2016/01/12]% \newcommand*\@ordinalMspanish[2]{% \edef#2{\number#1\relax\noexpand\fmtord{o}}% }% @@ -297,7 +297,7 @@ \fi }% \global\let\@@HundredstringFspanish\@@HundredstringFspanish -\DeclareRobustCommand{\@numberstringMspanish}[2]{% +\newcommand*{\@numberstringMspanish}[2]{% \let\@unitstring=\@@unitstringspanish \let\@teenstring=\@@teenstringspanish \let\@tenstring=\@@tenstringspanish @@ -308,7 +308,7 @@ \@@numberstringspanish{#1}{#2}% }% \global\let\@numberstringMspanish\@numberstringMspanish -\DeclareRobustCommand{\@numberstringFspanish}[2]{% +\newcommand*{\@numberstringFspanish}[2]{% \let\@unitstring=\@@unitstringFspanish \let\@teenstring=\@@teenstringspanish \let\@tenstring=\@@tenstringspanish @@ -320,7 +320,7 @@ }% \global\let\@numberstringFspanish\@numberstringFspanish \global\let\@numberstringNspanish\@numberstringMspanish -\DeclareRobustCommand{\@NumberstringMspanish}[2]{% +\newcommand*{\@NumberstringMspanish}[2]{% \let\@unitstring=\@@Unitstringspanish \let\@teenstring=\@@Teenstringspanish \let\@tenstring=\@@Tenstringspanish @@ -331,7 +331,7 @@ \@@numberstringspanish{#1}{#2}% }% \global\let\@NumberstringMspanish\@NumberstringMspanish -\DeclareRobustCommand{\@NumberstringFspanish}[2]{% +\newcommand*{\@NumberstringFspanish}[2]{% \let\@unitstring=\@@UnitstringFspanish \let\@teenstring=\@@Teenstringspanish \let\@tenstring=\@@Tenstringspanish @@ -343,7 +343,7 @@ }% \global\let\@NumberstringFspanish\@NumberstringFspanish \global\let\@NumberstringNspanish\@NumberstringMspanish -\DeclareRobustCommand{\@ordinalstringMspanish}[2]{% +\newcommand*{\@ordinalstringMspanish}[2]{% \let\@unitthstring=\@@unitthstringspanish \let\@unitstring=\@@unitstringspanish \let\@teenthstring=\@@teenthstringspanish @@ -353,7 +353,7 @@ \@@ordinalstringspanish{#1}{#2}% }% \global\let\@ordinalstringMspanish\@ordinalstringMspanish -\DeclareRobustCommand{\@ordinalstringFspanish}[2]{% +\newcommand*{\@ordinalstringFspanish}[2]{% \let\@unitthstring=\@@unitthstringFspanish \let\@unitstring=\@@unitstringFspanish \let\@teenthstring=\@@teenthstringFspanish @@ -364,7 +364,7 @@ }% \global\let\@ordinalstringFspanish\@ordinalstringFspanish \global\let\@ordinalstringNspanish\@ordinalstringMspanish -\DeclareRobustCommand{\@OrdinalstringMspanish}[2]{% +\newcommand*{\@OrdinalstringMspanish}[2]{% \let\@unitthstring=\@@Unitthstringspanish \let\@unitstring=\@@Unitstringspanish \let\@teenthstring=\@@Teenthstringspanish @@ -374,7 +374,7 @@ \@@ordinalstringspanish{#1}{#2}% } \global\let\@OrdinalstringMspanish\@OrdinalstringMspanish -\DeclareRobustCommand{\@OrdinalstringFspanish}[2]{% +\newcommand*{\@OrdinalstringFspanish}[2]{% \let\@unitthstring=\@@UnitthstringFspanish \let\@unitstring=\@@UnitstringFspanish \let\@teenthstring=\@@TeenthstringFspanish @@ -811,7 +811,9 @@ this number}% \fi }% \global\let\@@ordinalstringspanish\@@ordinalstringspanish - +\iffalse Local variables: \fi +\iffalse mode: docTeX \fi +\iffalse End: \fi%\iffalse \endinput %% %% End of file `fc-spanish.def'. diff --git a/Master/texmf-dist/tex/latex/fmtcount/fcnumparser.sty b/Master/texmf-dist/tex/latex/fmtcount/fcnumparser.sty index b65bfd53cf0..92063a43f9c 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fcnumparser.sty +++ b/Master/texmf-dist/tex/latex/fmtcount/fcnumparser.sty @@ -7,7 +7,7 @@ %% fmtcount.dtx (with options: `fcnumparser.sty,package') %% %% fmtcount.dtx -%% Copyright 2015 Nicola Talbot and Vincent Belaïche +%% Copyright 2017 Nicola Talbot and Vincent Belaïche %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -52,7 +52,7 @@ %% coding: utf-8 %% End: \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{fcnumparser}[2012/09/28] +\ProvidesPackage{fcnumparser}[2017/06/15] \def\fc@counter@parser#1{% \expandafter\fc@number@parser\expandafter{\the#1.}% } @@ -332,12 +332,12 @@ of macro `fc@get@last@word'}}% \def\fc@get@last@word#1#2#3{% {% - \def\@tempa##1\fc@case##2\@nil\fc@end{% + \def\@tempa##1\fc@wcase##2\@nil\fc@end{% \toks0{##1}% - \toks1{##2\fc@case}% + \toks1{##2\fc@wcase}% }% \@tempa#1\fc@end - \def\@tempa##1\fc@case##2\fc@end{% + \def\@tempa##1\fc@wcase##2\fc@end{% \toks2{##1}% \def\@tempb{##2}% \toks3{##2}% @@ -351,7 +351,7 @@ \expandafter\expandafter\expandafter\@tempt \expandafter\expandafter\expandafter{% \expandafter\the\expandafter\@tempt - \expandafter\fc@case\the\toks2}% + \expandafter\fc@wcase\the\toks2}% \toks1\toks3 % \fi \next diff --git a/Master/texmf-dist/tex/latex/fmtcount/fcprefix.sty b/Master/texmf-dist/tex/latex/fmtcount/fcprefix.sty index e82d9a8b367..2518477c032 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fcprefix.sty +++ b/Master/texmf-dist/tex/latex/fmtcount/fcprefix.sty @@ -7,7 +7,7 @@ %% fmtcount.dtx (with options: `fcprefix.sty,package') %% %% fmtcount.dtx -%% Copyright 2015 Nicola Talbot and Vincent Belaïche +%% Copyright 2017 Nicola Talbot and Vincent Belaïche %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/fmtcount/fmtcount.sty b/Master/texmf-dist/tex/latex/fmtcount/fmtcount.sty index 6d55bef08fc..e923c801f81 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fmtcount.sty +++ b/Master/texmf-dist/tex/latex/fmtcount/fmtcount.sty @@ -7,7 +7,7 @@ %% fmtcount.dtx (with options: `fmtcount.sty,package') %% %% fmtcount.dtx -%% Copyright 2015 Nicola Talbot and Vincent Belaïche +%% Copyright 2017 Nicola Talbot and Vincent Belaïche %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -51,8 +51,9 @@ %% Local Variables: %% coding: utf-8 %% End: + \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{fmtcount}[2015/05/05 v3.01] +\ProvidesPackage{fmtcount}[2016/01/12 v3.02] \RequirePackage{ifthen} \RequirePackage{xkeyval} \RequirePackage{etoolbox} @@ -277,7 +278,7 @@ italian} \newif\if@DT@padzeroes \newcount\@DT@loopN \newcount\@DT@X -\newcommand*{\@binary}[1]{% +\newrobustcmd*{\@binary}[1]{% \@DT@padzeroestrue \@DT@loopN=17\relax \@strctr=\@DT@loopN @@ -303,7 +304,7 @@ italian} } \let\binarynum=\@binary -\newcommand*{\@octal}[1]{% +\newrobustcmd*{\@octal}[1]{% \ifnum#1>32768 \PackageError{fmtcount}% {Value of counter too large for \protect\@octal} @@ -337,7 +338,7 @@ italian} \ifcase#10\or1\or2\or3\or4\or5\or 6\or7\or8\or9\or a\or b\or c\or d\or e\or f\fi } -\newcommand*{\@hexadecimal}[1]{% +\newrobustcmd*{\@hexadecimal}[1]{% \@DT@padzeroestrue \@DT@loopN=5\relax \@strctr=\@DT@loopN @@ -365,7 +366,7 @@ italian} \ifcase#10\or1\or2\or3\or4\or5\or6\or 7\or8\or9\or A\or B\or C\or D\or E\or F\fi } -\newcommand*{\@Hexadecimal}[1]{% +\newrobustcmd*{\@Hexadecimal}[1]{% \@DT@padzeroestrue \@DT@loopN=5\relax \@strctr=\@DT@loopN @@ -390,7 +391,7 @@ italian} } \let\Hexadecimalnum=\@Hexadecimal -\newcommand*{\@aaalph}[1]{% +\newrobustcmd*{\@aaalph}[1]{% \@DT@loopN=#1\relax \advance\@DT@loopN by -1\relax \divide\@DT@loopN by 26\relax @@ -409,7 +410,7 @@ italian} } \let\aaalphnum=\@aaalph -\newcommand*{\@AAAlph}[1]{% +\newrobustcmd*{\@AAAlph}[1]{% \@DT@loopN=#1\relax \advance\@DT@loopN by -1\relax \divide\@DT@loopN by 26\relax @@ -428,7 +429,7 @@ italian} } \let\AAAlphnum=\@AAAlph -\newcommand*{\@abalph}[1]{% +\newrobustcmd*{\@abalph}[1]{% \ifnum#1>17576\relax \PackageError{fmtcount}% {Value of counter too large for \protect\@abalph}% @@ -456,7 +457,7 @@ italian} } \let\abalphnum=\@abalph -\newcommand*{\@ABAlph}[1]{% +\newrobustcmd*{\@ABAlph}[1]{% \ifnum#1>17576\relax \PackageError{fmtcount}% {Value of counter too large for \protect\@ABAlph}% @@ -490,7 +491,7 @@ italian} \@fmtc@count#2\relax \fi } -\newcommand{\@decimal}[1]{% +\newrobustcmd*{\@decimal}[1]{% \@strctr=0\relax \expandafter\@fmtc@count\number#1\relax \@DT@loopN=\c@padzeroesN @@ -504,8 +505,8 @@ italian} \let\decimalnum=\@decimal \newcommand{\FCordinal}[1]{% - \expandafter\protect\expandafter\ordinalnum{% - \expandafter\the\csname c@#1\endcsname}% + \ordinalnum{% + \the\value{#1}}% } \ifcsundef{ordinal} {\let\ordinal\FCordinal}% @@ -514,7 +515,7 @@ italian} {\protect\ordinal \space already defined use \protect\FCordinal \space instead.} } -\newcommand*{\ordinalnum}[1]{% +\DeclareRobustCommand*{\ordinalnum}[1]{% \new@ifnextchar[% {\@ordinalnum{#1}}% {\@ordinalnum{#1}[m]}% @@ -545,10 +546,13 @@ italian} }% } \newcommand*{\storeordinal}[2]{% - \expandafter\protect\expandafter\storeordinalnum{#1}{% - \expandafter\the\csname c@#2\endcsname}% + {% + \toks0{\storeordinalnum{#1}}% + \expandafter + }\the\toks0\expandafter{% + \the\value{#2}}% } -\newcommand*{\storeordinalnum}[2]{% +\newrobustcmd*{\storeordinalnum}[2]{% \@ifnextchar[% {\@storeordinalnum{#1}{#2}}% {\@storeordinalnum{#1}{#2}[m]}% @@ -578,10 +582,10 @@ italian} } \newcommand*{\FMCuse}[1]{\csname @fcs@#1\endcsname} \newcommand*{\ordinalstring}[1]{% - \expandafter\protect\expandafter\ordinalstringnum{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\ordinalstringnum\expandafter{% + \the\value{#1}}% } -\newcommand{\ordinalstringnum}[1]{% +\newrobustcmd*{\ordinalstringnum}[1]{% \new@ifnextchar[% {\@ordinal@string{#1}}% {\@ordinal@string{#1}[m]}% @@ -612,10 +616,12 @@ italian} }% } \newcommand*{\storeordinalstring}[2]{% - \expandafter\protect\expandafter\storeordinalstringnum{#1}{% - \expandafter\the\csname c@#2\endcsname}% + {% + \toks0{\storeordinalstringnum{#1}}% + \expandafter + }\the\toks0\expandafter{\the\value{#2}}% } -\newcommand*{\storeordinalstringnum}[2]{% +\newrobustcmd*{\storeordinalstringnum}[2]{% \@ifnextchar[% {\@store@ordinal@string{#1}{#2}}% {\@store@ordinal@string{#1}{#2}[m]}% @@ -644,10 +650,10 @@ italian} \expandafter\let\csname @fcs@#1\endcsname\@fc@ordstr } \newcommand*{\Ordinalstring}[1]{% - \expandafter\protect\expandafter\Ordinalstringnum{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\Ordinalstringnum\expandafter{% + \the\value{#1}}% } -\newcommand*{\Ordinalstringnum}[1]{% +\newrobustcmd*{\Ordinalstringnum}[1]{% \new@ifnextchar[% {\@Ordinal@string{#1}}% {\@Ordinal@string{#1}[m]}% @@ -678,10 +684,12 @@ italian} }% } \newcommand*{\storeOrdinalstring}[2]{% - \expandafter\protect\expandafter\storeOrdinalstringnum{#1}{% - \expandafter\the\csname c@#2\endcsname}% + {% + \toks0{\storeOrdinalstringnum{#1}}% + \expandafter + }\the\toks0\expandafter{\the\value{#2}}% } -\newcommand*{\storeOrdinalstringnum}[2]{% +\newrobustcmd*{\storeOrdinalstringnum}[2]{% \@ifnextchar[% {\@store@Ordinal@string{#1}{#2}}% {\@store@Ordinal@string{#1}{#2}[m]}% @@ -710,10 +718,12 @@ italian} \expandafter\let\csname @fcs@#1\endcsname\@fc@ordstr } \newcommand*{\storeORDINALstring}[2]{% - \expandafter\protect\expandafter\storeORDINALstringnum{#1}{% - \expandafter\the\csname c@#2\endcsname}% + {% + \toks0{\storeORDINALstringnum{#1}}% + \expandafter + }\the\toks0\expandafter{\the\value{#2}}% } -\newcommand*{\storeORDINALstringnum}[2]{% +\newrobustcmd*{\storeORDINALstringnum}[2]{% \@ifnextchar[% {\@store@ORDINAL@string{#1}{#2}}% {\@store@ORDINAL@string{#1}{#2}[m]}% @@ -744,11 +754,11 @@ italian} }% } \newcommand*{\ORDINALstring}[1]{% - \expandafter\protect\expandafter\ORDINALstringnum{% - \expandafter\the\csname c@#1\endcsname + \expandafter\ORDINALstringnum\expandafter{% + \the\value{#1}% }% } -\newcommand*{\ORDINALstringnum}[1]{% +\newrobustcmd*{\ORDINALstringnum}[1]{% \new@ifnextchar[% {\@ORDINAL@string{#1}}% {\@ORDINAL@string{#1}[m]}% @@ -780,7 +790,7 @@ italian} } \newcommand*{\storenumberstring}[2]{% \expandafter\protect\expandafter\storenumberstringnum{#1}{% - \expandafter\the\csname c@#2\endcsname}% + \expandafter\the\value{#2}}% } \newcommand{\storenumberstringnum}[2]{% \@ifnextchar[% @@ -811,10 +821,10 @@ italian} \expandafter\let\csname @fcs@#1\endcsname\@fc@numstr } \newcommand*{\numberstring}[1]{% - \expandafter\protect\expandafter\numberstringnum{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\numberstringnum\expandafter{% + \the\value{#1}}% } -\newcommand*{\numberstringnum}[1]{% +\newrobustcmd*{\numberstringnum}[1]{% \new@ifnextchar[% {\@number@string{#1}}% {\@number@string{#1}[m]}% @@ -845,8 +855,10 @@ italian} }% } \newcommand*{\storeNumberstring}[2]{% - \expandafter\protect\expandafter\storeNumberstringnum{#1}{% - \expandafter\the\csname c@#2\endcsname}% + {% + \toks0{\storeNumberstringnum{#1}}% + \expandafter + }\the\toks0\expandafter{\the\value{#2}}% } \newcommand{\storeNumberstringnum}[2]{% \@ifnextchar[% @@ -877,10 +889,10 @@ italian} \expandafter\let\csname @fcs@#1\endcsname\@fc@numstr } \newcommand*{\Numberstring}[1]{% - \expandafter\protect\expandafter\Numberstringnum{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\Numberstringnum\expandafter{% + \the\value{#1}}% } -\newcommand*{\Numberstringnum}[1]{% +\newrobustcmd*{\Numberstringnum}[1]{% \new@ifnextchar[% {\@Number@string{#1}}% {\@Number@string{#1}[m]}% @@ -911,8 +923,10 @@ italian} }% } \newcommand{\storeNUMBERstring}[2]{% - \expandafter\protect\expandafter\storeNUMBERstringnum{#1}{% - \expandafter\the\csname c@#2\endcsname}% + {% + \toks0{\storeNUMBERstringnum{#1}}% + \expandafter + }\the\toks0\expandafter{\the\value{#2}}% } \newcommand{\storeNUMBERstringnum}[2]{% \@ifnextchar[% @@ -945,10 +959,10 @@ italian} }% } \newcommand*{\NUMBERstring}[1]{% - \expandafter\protect\expandafter\NUMBERstringnum{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\NUMBERstringnum\expandafter{% + \the\value{#1}}% } -\newcommand*{\NUMBERstringnum}[1]{% +\newrobustcmd*{\NUMBERstringnum}[1]{% \new@ifnextchar[% {\@NUMBER@string{#1}}% {\@NUMBER@string{#1}[m]}% @@ -979,40 +993,49 @@ italian} }% } \providecommand*{\binary}[1]{% - \expandafter\protect\expandafter\@binary{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\@binary + \expandafter{% + \the\value{#1}}% } \providecommand*{\aaalph}[1]{% - \expandafter\protect\expandafter\@aaalph{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\@aaalph + \expandafter{% + \the\value{#1}}% } \providecommand*{\AAAlph}[1]{% - \expandafter\protect\expandafter\@AAAlph{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\@AAAlph + \expandafter{% + \the\value{#1}}% } \providecommand*{\abalph}[1]{% - \expandafter\protect\expandafter\@abalph{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\@abalph + \expandafter{% + \the\value{#1}}% } \providecommand*{\ABAlph}[1]{% - \expandafter\protect\expandafter\@ABAlph{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\@ABAlph + \expandafter{% + \the\value{#1}}% } \providecommand*{\hexadecimal}[1]{% - \expandafter\protect\expandafter\@hexadecimal{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\@hexadecimal + \expandafter{% + \the\value{#1}}% } \providecommand*{\Hexadecimal}[1]{% - \expandafter\protect\expandafter\@Hexadecimal{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\@Hexadecimal + \expandafter{% + \the\value{#1}}% } \providecommand*{\octal}[1]{% - \expandafter\protect\expandafter\@octal{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\@octal + \expandafter{% + \the\value{#1}}% } \providecommand*{\decimal}[1]{% - \expandafter\protect\expandafter\@decimal{% - \expandafter\the\csname c@#1\endcsname}% + \expandafter\@decimal + \expandafter{% + \the\value{#1}}% } \def\@setdef@ultfmtcount{% \ifcsundef{@ordinalMenglish}{\FCloadlang{english}}{}% |