summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fmtcount/fmtcount.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/fmtcount/fmtcount.sty')
-rw-r--r--Master/texmf-dist/tex/latex/fmtcount/fmtcount.sty223
1 files changed, 177 insertions, 46 deletions
diff --git a/Master/texmf-dist/tex/latex/fmtcount/fmtcount.sty b/Master/texmf-dist/tex/latex/fmtcount/fmtcount.sty
index 9ca97952fb5..61a1428756a 100644
--- a/Master/texmf-dist/tex/latex/fmtcount/fmtcount.sty
+++ b/Master/texmf-dist/tex/latex/fmtcount/fmtcount.sty
@@ -27,7 +27,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{fmtcount}[2007/01/06 v1.06]
+\ProvidesPackage{fmtcount}[2007/04/20 v1.09]
\RequirePackage{ifthen}
\RequirePackage{keyval}
\providecommand{\fmtord}[1]{\textsuperscript{#1}}
@@ -318,86 +318,217 @@ or `user'}}}
\space already defined use \string\FCordinal \space instead.}}
\newcommand{\ordinalnum}[1]{\@ifnextchar[{\@ordinalnum{#1}}{%
\@ordinalnum{#1}[m]}}
-
-\def\@ordinalnum#1[#2]{%
+\def\@ordinalnum#1[#2]{{%
\ifthenelse{\equal{#2}{f}}{%
-\protect\@ordinalF{#1}}{%
+\protect\@ordinalF{#1}{\@fc@ordstr}}{%
\ifthenelse{\equal{#2}{m}}{}{%
\PackageError{fmtcount}{Invalid gender option `#2'}{%
Available options are m or f}}%
-\protect\@ordinalM{#1}}}
-
+\protect\@ordinalM{#1}{\@fc@ordstr}}\@fc@ordstr}}
+\newcommand*{\storeordinal}[2]{%
+\expandafter\protect\expandafter\storeordinalnum{#1}{%
+\expandafter\the\csname c@#2\endcsname}}
+\newcommand*{\storeordinalnum}[2]{%
+\@ifnextchar[{\@storeordinalnum{#1}{#2}}{%
+\@storeordinalnum{#1}{#2}[m]}}
+\def\@storeordinalnum#1#2[#3]{%
+\ifthenelse{\equal{#3}{f}}{%
+\protect\@ordinalF{#2}{\@fc@ord}}{%
+\ifthenelse{\equal{#3}{m}}{}{%
+\PackageError{fmtcount}{Invalid gender option `#3'}{%
+Available options are m or f}}%
+\protect\@ordinalM{#2}{\@fc@ord}}%
+\expandafter\let\csname @fcs@#1\endcsname\@fc@ord}
+\newcommand*{\FMCuse}[1]{\csname @fcs@#1\endcsname}
\newcommand{\ordinalstring}[1]{%
\expandafter\protect\expandafter\ordinalstringnum{%
\expandafter\the\csname c@#1\endcsname}}
-
\newcommand{\ordinalstringnum}[1]{%
\@ifnextchar[{\@ordinal@string{#1}}{\@ordinal@string{#1}[m]}}
-
-\def\@ordinal@string#1[#2]{%
+\def\@ordinal@string#1[#2]{{%
\ifthenelse{\equal{#2}{f}}{%
-\protect\@ordinalstringF{#1}}{%
+\protect\@ordinalstringF{#1}{\@fc@ordstr}}{%
\ifthenelse{\equal{#2}{m}}{}{%
\PackageError{fmtcount}{Invalid gender option `#2' to
\string\ordinalstring}{Available options are m or f}}%
-\protect\@ordinalstringM{#1}}}
-
+\protect\@ordinalstringM{#1}{\@fc@ordstr}}\@fc@ordstr}}
+\newcommand{\storeordinalstring}[2]{%
+\expandafter\protect\expandafter\storeordinalstringnum{#1}{%
+\expandafter\the\csname c@#2\endcsname}}
+\newcommand{\storeordinalstringnum}[2]{%
+\@ifnextchar[{\@store@ordinal@string{#1}{#2}}{%
+\@store@ordinal@string{#1}{#2}[m]}}
+\def\@store@ordinal@string#1#2[#3]{%
+\ifthenelse{\equal{#3}{f}}{%
+\protect\@ordinalstringF{#2}{\@fc@ordstr}}{%
+\ifthenelse{\equal{#3}{m}}{}{%
+\PackageError{fmtcount}{Invalid gender option `#3' to
+\string\ordinalstring}{Available options are m or f}}%
+\protect\@ordinalstringM{#2}{\@fc@ordstr}}%
+\expandafter\let\csname @fcs@#1\endcsname\@fc@ordstr}
\newcommand{\Ordinalstring}[1]{%
\expandafter\protect\expandafter\Ordinalstringnum{%
\expandafter\the\csname c@#1\endcsname}}
-
\newcommand{\Ordinalstringnum}[1]{%
\@ifnextchar[{\@Ordinal@string{#1}}{\@Ordinal@string{#1}[m]}}
-
-\def\@Ordinal@string#1[#2]{%
+\def\@Ordinal@string#1[#2]{{%
\ifthenelse{\equal{#2}{f}}{%
-\protect\@OrdinalstringF{#1}}{%
+\protect\@OrdinalstringF{#1}{\@fc@ordstr}}{%
\ifthenelse{\equal{#2}{m}}{}{%
-\PackageError{fmtcount}{Invalid gender option `#2' to
-\string\Ordinalstring}{Available options are m or f}}%
-\protect\@OrdinalstringM{#1}}}
-
+\PackageError{fmtcount}{Invalid gender option `#2'}{%
+Available options are m or f}}%
+\protect\@OrdinalstringM{#1}{\@fc@ordstr}}\@fc@ordstr}}
+\newcommand{\storeOrdinalstring}[2]{%
+\expandafter\protect\expandafter\storeOrdinalstringnum{#1}{%
+\expandafter\the\csname c@#2\endcsname}}
+\newcommand{\storeOrdinalstringnum}[2]{%
+\@ifnextchar[{\@store@Ordinal@string{#1}{#2}}{%
+\@store@Ordinal@string{#1}{#2}[m]}}
+\def\@store@Ordinal@string#1#2[#3]{%
+\ifthenelse{\equal{#3}{f}}{%
+\protect\@OrdinalstringF{#2}{\@fc@ordstr}}{%
+\ifthenelse{\equal{#3}{m}}{}{%
+\PackageError{fmtcount}{Invalid gender option `#3'}{%
+Available options are m or f}}%
+\protect\@OrdinalstringM{#2}{\@fc@ordstr}}%
+\expandafter\let\csname @fcs@#1\endcsname\@fc@ordstr}
+\newcommand{\storeORDINALstring}[2]{%
+\expandafter\protect\expandafter\storeORDINALstringnum{#1}{%
+\expandafter\the\csname c@#2\endcsname}}
+\newcommand{\storeORDINALstringnum}[2]{%
+\@ifnextchar[{\@store@ORDINAL@string{#1}{#2}}{%
+\@store@ORDINAL@string{#1}{#2}[m]}}
+\def\@store@ORDINAL@string#1#2[#3]{%
+\ifthenelse{\equal{#3}{f}}{%
+\protect\@ordinalstringF{#2}{\@fc@ordstr}}{%
+\ifthenelse{\equal{#3}{m}}{}{%
+\PackageError{fmtcount}{Invalid gender option `#3'}{%
+Available options are m or f}}%
+\protect\@ordinalstringM{#2}{\@fc@ordstr}}%
+\expandafter\edef\csname @fcs@#1\endcsname{%
+\noexpand\MakeUppercase{\@fc@ordstr}}}
+\newcommand{\ORDINALstring}[1]{%
+\expandafter\protect\expandafter\ORDINALstringnum{%
+\expandafter\the\csname c@#1\endcsname}}
+\newcommand{\ORDINALstringnum}[1]{%
+\@ifnextchar[{\@ORDINAL@string{#1}}{\@ORDINAL@string{#1}[m]}}
+\def\@ORDINAL@string#1[#2]{{%
+\ifthenelse{\equal{#2}{f}}{%
+\protect\@ordinalstringF{#1}{\@fc@ordstr}}{%
+\ifthenelse{\equal{#2}{m}}{}{%
+\PackageError{fmtcount}{Invalid gender option `#2'}{%
+Available options are m or f}}%
+\protect\@ordinalstringM{#1}{\@fc@ordstr}}%
+\MakeUppercase{\@fc@ordstr}}}
+\newcommand{\storenumberstring}[2]{%
+\expandafter\protect\expandafter\storenumberstringnum{#1}{%
+\expandafter\the\csname c@#2\endcsname}}
+\newcommand{\storenumberstringnum}[2]{%
+\@ifnextchar[{\@store@number@string{#1}{#2}}{%
+\@store@number@string{#1}{#2}[m]}}
+\def\@store@number@string#1#2[#3]{%
+\ifthenelse{\equal{#3}{f}}{%
+\protect\@numberstringF{#2}{\@fc@numstr}}{%
+\ifthenelse{\equal{#3}{m}}{}{%
+\PackageError{fmtcount}{Invalid gender option `#3'}{%
+Available options are m or f}}%
+\protect\@numberstringM{#2}{\@fc@numstr}}%
+\expandafter\let\csname @fcs@#1\endcsname\@fc@numstr}
\newcommand{\numberstring}[1]{%
\expandafter\protect\expandafter\numberstringnum{%
\expandafter\the\csname c@#1\endcsname}}
-
\newcommand{\numberstringnum}[1]{%
\@ifnextchar[{\@number@string{#1}}{\@number@string{#1}[m]}}
-
-\def\@number@string#1[#2]{%
+\def\@number@string#1[#2]{{%
\ifthenelse{\equal{#2}{f}}{%
-\protect\@numberstringF{#1}}{%
+\protect\@numberstringF{#1}{\@fc@numstr}}{%
\ifthenelse{\equal{#2}{m}}{}{%
-\PackageError{fmtcount}{Invalid gender option `#2' to
-\string\numberstring}{Available options are m or f}}%
-\protect\@numberstringM{#1}}}
-
+\PackageError{fmtcount}{Invalid gender option `#2'}{%
+Available options are m or f}}%
+\protect\@numberstringM{#1}{\@fc@numstr}}\@fc@numstr}}
+\newcommand{\storeNumberstring}[2]{%
+\expandafter\protect\expandafter\storeNumberstringnum{#1}{%
+\expandafter\the\csname c@#2\endcsname}}
+\newcommand{\storeNumberstringnum}[2]{%
+\@ifnextchar[{\@store@Number@string{#1}{#2}}{%
+\@store@Number@string{#1}{#2}[m]}}
+\def\@store@Number@string#1#2[#3]{%
+\ifthenelse{\equal{#3}{f}}{%
+\protect\@NumberstringF{#2}{\@fc@numstr}}{%
+\ifthenelse{\equal{#3}{m}}{}{%
+\PackageError{fmtcount}{Invalid gender option `#3'}{%
+Available options are m or f}}%
+\protect\@NumberstringM{#2}{\@fc@numstr}}%
+\expandafter\let\csname @fcs@#1\endcsname\@fc@numstr}
\newcommand{\Numberstring}[1]{%
\expandafter\protect\expandafter\Numberstringnum{%
\expandafter\the\csname c@#1\endcsname}}
-
\newcommand{\Numberstringnum}[1]{%
\@ifnextchar[{\@Number@string{#1}}{\@Number@string{#1}[m]}}
-
-\def\@Number@string#1[#2]{%
+\def\@Number@string#1[#2]{{%
\ifthenelse{\equal{#2}{f}}{%
-\protect\@NumberstringF{#1}}{%
+\protect\@NumberstringF{#1}{\@fc@numstr}}{%
\ifthenelse{\equal{#2}{m}}{}{%
-\PackageError{fmtcount}{Invalid gender option `#2' to
-\string\Numberstring}{Available options are m or f}}%
-\protect\@NumberstringM{#1}}}
-
-\providecommand{\binary}[1]{\expandafter\protect\expandafter\@binary{\expandafter\the\csname c@#1\endcsname}}
-\providecommand{\aaalph}[1]{\expandafter\protect\expandafter\@aaalph{\expandafter\the\csname c@#1\endcsname}}
-\providecommand{\AAAlph}[1]{\expandafter\protect\expandafter\@AAAlph{\expandafter\the\csname c@#1\endcsname}}
-\providecommand{\abalph}[1]{\expandafter\protect\expandafter\@abalph{\expandafter\the\csname c@#1\endcsname}}
-\providecommand{\ABAlph}[1]{\expandafter\protect\expandafter\@ABAlph{\expandafter\the\csname c@#1\endcsname}}
-\providecommand{\hexadecimal}[1]{\expandafter\protect\expandafter\@hexadecimal{\expandafter\the\csname c@#1\endcsname}}
-\providecommand{\Hexadecimal}[1]{\expandafter\protect\expandafter\@Hexadecimal{\expandafter\the\csname c@#1\endcsname}}
-\providecommand{\octal}[1]{\expandafter\protect\expandafter\@octal{\expandafter\the\csname c@#1\endcsname}}
-\providecommand{\decimal}[1]{\expandafter\protect\expandafter\@decimal{\expandafter\the\csname c@#1\endcsname}}
+\PackageError{fmtcount}{Invalid gender option `#2'}{%
+Available options are m or f}}%
+\protect\@NumberstringM{#1}{\@fc@numstr}}\@fc@numstr}}
+\newcommand{\storeNUMBERstring}[2]{%
+\expandafter\protect\expandafter\storeNUMBERstringnum{#1}{%
+\expandafter\the\csname c@#2\endcsname}}
+\newcommand{\storeNUMBERstringnum}[2]{%
+\@ifnextchar[{\@store@NUMBER@string{#1}{#2}}{%
+\@store@NUMBER@string{#1}{#2}[m]}}
+\def\@store@NUMBER@string#1#2[#3]{%
+\ifthenelse{\equal{#3}{f}}{%
+\protect\@numberstringF{#2}{\@fc@numstr}}{%
+\ifthenelse{\equal{#3}{m}}{}{%
+\PackageError{fmtcount}{Invalid gender option `#3'}{%
+Available options are m or f}}%
+\protect\@numberstringM{#2}{\@fc@numstr}}%
+\expandafter\edef\csname @fcs@#1\endcsname{%
+\noexpand\MakeUppercase{\@fc@numstr}}}
+\newcommand{\NUMBERstring}[1]{%
+\expandafter\protect\expandafter\NUMBERstringnum{%
+\expandafter\the\csname c@#1\endcsname}}
+\newcommand{\NUMBERstringnum}[1]{%
+\@ifnextchar[{\@NUMBER@string{#1}}{\@NUMBER@string{#1}[m]}}
+\def\@NUMBER@string#1[#2]{{%
+\ifthenelse{\equal{#2}{f}}{%
+\protect\@numberstringF{#1}{\@fc@numstr}}{%
+\ifthenelse{\equal{#2}{m}}{}{%
+\PackageError{fmtcount}{Invalid gender option `#2'}{%
+Available options are m or f}}%
+\protect\@numberstringM{#1}{\@fc@numstr}}%
+\MakeUppercase{\@fc@numstr}}}
+\providecommand{\binary}[1]{%
+\expandafter\protect\expandafter\@binary{%
+\expandafter\the\csname c@#1\endcsname}}
+\providecommand{\aaalph}[1]{%
+\expandafter\protect\expandafter\@aaalph{%
+\expandafter\the\csname c@#1\endcsname}}
+\providecommand{\AAAlph}[1]{%
+\expandafter\protect\expandafter\@AAAlph{%
+\expandafter\the\csname c@#1\endcsname}}
+\providecommand{\abalph}[1]{%
+\expandafter\protect\expandafter\@abalph{%
+\expandafter\the\csname c@#1\endcsname}}
+\providecommand{\ABAlph}[1]{%
+\expandafter\protect\expandafter\@ABAlph{%
+\expandafter\the\csname c@#1\endcsname}}
+\providecommand{\hexadecimal}[1]{%
+\expandafter\protect\expandafter\@hexadecimal{%
+\expandafter\the\csname c@#1\endcsname}}
+\providecommand{\Hexadecimal}[1]{%
+\expandafter\protect\expandafter\@Hexadecimal{%
+\expandafter\the\csname c@#1\endcsname}}
+\providecommand{\octal}[1]{%
+\expandafter\protect\expandafter\@octal{%
+\expandafter\the\csname c@#1\endcsname}}
+\providecommand{\decimal}[1]{%
+\expandafter\protect\expandafter\@decimal{%
+\expandafter\the\csname c@#1\endcsname}}
\def\@setdef@ultfmtcount{
-\@ifundefined{@ordinalenglish}{\input{fc-english.def}}{}
+\@ifundefined{@ordinalMenglish}{\input{fc-english.def}}{}
\def\@ordinalstringM{\@ordinalstringMenglish}
\let\@ordinalstringF=\@ordinalstringMenglish
\def\@OrdinalstringM{\@OrdinalstringMenglish}