diff options
author | Karl Berry <karl@freefriends.org> | 2012-10-24 23:27:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-10-24 23:27:48 +0000 |
commit | 08704ece89438d6c40c2e673c25c38906294712a (patch) | |
tree | d3a9c36d7f7318847b7d8ed8cc53cf79ecf5e01a /Master/texmf-dist/tex | |
parent | 0e06b454144b2b566f5889836e1605d9cade581a (diff) |
fmtcount (24oct12)
git-svn-id: svn://tug.org/texlive/trunk@28068 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/fmtcount/fc-french.def | 5 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/fmtcount/fmtcount.sty | 208 |
2 files changed, 63 insertions, 150 deletions
diff --git a/Master/texmf-dist/tex/latex/fmtcount/fc-french.def b/Master/texmf-dist/tex/latex/fmtcount/fc-french.def index 127258d60d3..c33aaf8a48a 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fc-french.def +++ b/Master/texmf-dist/tex/latex/fmtcount/fc-french.def @@ -48,8 +48,7 @@ %%\begin{definition}[\DescribeMacro{\latinnumeralstringnum}] %%\cs{latinnumeralstringnum}\marg{number}\oarg{prefix options} %%\end{definition} -\ProvidesFCLanguage{french}[2012/06/18] -\RequirePackage{fcprefix} +\ProvidesFCLanguage{french}[2012/10/24] \def\fc@french@set@plural#1#2#3#4#5#6{% \ifthenelse{\equal{#2}{reformed}}{% \expandafter\def\csname fc@frenchoptions@#1@plural\endcsname{#3}% @@ -1149,7 +1148,7 @@ z\'ero% \fc@frenchoptions@setdefaults \iffalse Local variables: \fi \iffalse mode: docTeX \fi -\iffalse End: \fi%\iffalse +\iffalse End: \fi \endinput %% %% End of file `fc-french.def'. diff --git a/Master/texmf-dist/tex/latex/fmtcount/fmtcount.sty b/Master/texmf-dist/tex/latex/fmtcount/fmtcount.sty index 940f3aea2ca..22545873e48 100644 --- a/Master/texmf-dist/tex/latex/fmtcount/fmtcount.sty +++ b/Master/texmf-dist/tex/latex/fmtcount/fmtcount.sty @@ -49,19 +49,34 @@ %%\cs{latinnumeralstringnum}\marg{number}\oarg{prefix options} %%\end{definition} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{fmtcount}[2012/09/28 v2.01] +\ProvidesPackage{fmtcount}[2012/10/24 v2.02] \RequirePackage{ifthen} \RequirePackage{keyval} \RequirePackage{etoolbox} +\RequirePackage{fcprefix} \RequirePackage{amsgen} \providecommand*{\fmtord}[1]{\textsuperscript{#1}} \newcount\c@padzeroesN \c@padzeroesN=1\relax \providecommand*{\padzeroes}[1][17]{\c@padzeroesN=#1} +\newcount\fc@tmpcatcode +\def\fc@languages{} +\def\fc@mainlang{}% \newcommand*{\FCloadlang}[1]{% \@FC@iflangloaded{#1}{}% {% + \fc@tmpcatcode=\catcode`\@\relax + \catcode `\@ 11\relax \input{fc-#1.def}% + \catcode `\@ \fc@tmpcatcode\relax + \ifdefempty{\fc@languages}% + {% + \def\fc@languages{#1}% + }% + {% + \appto\fc@languages{,#1}% + }% + \def\fc@mainlang{#1}% }% } \newcommand{\@FC@iflangloaded}[3]{% @@ -946,186 +961,85 @@ \let\@ordinalF=\@ordinalM \let\@ordinalN=\@ordinalM } -\def\@set@mulitling@fmtcount{% - \def\@numberstringM{% - \@ifundefined{@numberstringM\languagename}% +\newcommand*{\fc@multiling}[2]{% + \ifcsundef{@#1#2\languagename}% + {% try loading it + \FCloadlang{\languagename}% + }% + {% + }% + \ifcsundef{@#1#2\languagename}% + {% + \PackageWarning{fmtcount}% + {No support for \expandafter\string\csname#1\endcsname\space for + language '\languagename'}% + \ifthenelse{\equal{\languagename}{\fc@mainlang}}% {% - \PackageWarning{fmtcount}% - {No support for \string\numberstring\space for - language '\languagename'}% - \@numberstringMenglish + \FCloadlang{english}% }% {% - \csname @numberstringM\languagename\endcsname }% - }% - \def\@numberstringF{% - \@ifundefined{@numberstringF\languagename}% + \ifcsdef{@#1#2\fc@mainlang}% {% - \PackageWarning{fmtcount}% - {No support for \string\numberstring\space for - language '\languagename'}% - \@numberstringMenglish + \csuse{@#1#2\fc@mainlang}% }% {% - \csname @numberstringF\languagename\endcsname + \PackageWarningNoLine{fmtcount}% + {No languages loaded at all! Loading english definitions}% + \FCloadlang{english}% + \def\fc@mainlang{english}% + \csuse{@#1#2english}% }% }% + {% + \csuse{@#1#2\languagename}% + }% +} +\def\@set@mulitling@fmtcount{% + \def\@numberstringM{% + \fc@multiling{numberstring}{M}% + }% + \def\@numberstringF{% + \fc@multiling{numberstring}{F}% + }% \def\@numberstringN{% - \@ifundefined{@numberstringN\languagename}% - {% - \PackageWarning{fmtcount}% - {No support for \string\numberstring\space for - language '\languagename'}% - \@numberstringMenglish - }% - {% - \csname @numberstringN\languagename\endcsname - }% + \fc@multiling{numberstring}{N}% }% \def\@NumberstringM{% - \@ifundefined{@NumberstringM\languagename}% - {% - \PackageWarning{fmtcount}% - {No support for \string\Numberstring\space - for language '\languagename'}% - \@NumberstringMenglish - }% - {% - \csname @NumberstringM\languagename\endcsname - }% + \fc@multiling{Numberstring}{M}% }% \def\@NumberstringF{% - \@ifundefined{@NumberstringF\languagename}% - {% - \PackageWarning{fmtcount}% - {No support for \string\Numberstring\space - for language '\languagename'}% - \@NumberstringMenglish - }% - {% - \csname @NumberstringF\languagename\endcsname - }% + \fc@multiling{Numberstring}{F}% }% \def\@NumberstringN{% - \@ifundefined{@NumberstringN\languagename}% - {% - \PackageWarning{fmtcount}% - {No support for \string\Numberstring\space - for language '\languagename'}% - \@NumberstringMenglish - }% - {% - \csname @NumberstringN\languagename\endcsname - }% + \fc@multiling{Numberstring}{N}% }% \def\@ordinalM{% - \@ifundefined{@ordinalM\languagename}% - {% - \PackageWarning{fmtcount}% - {No support for \string\ordinal\space - for language '\languagename'}% - \@ordinalMenglish - }% - {% - \csname @ordinalM\languagename\endcsname - }% + \fc@multiling{ordinal}{M}% }% \def\@ordinalF{% - \@ifundefined{@ordinalF\languagename}% - {% - \PackageWarning{fmtcount}% - {No support for \string\ordinal\space - for language '\languagename'}% - \@ordinalMenglish - }% - {% - \csname @ordinalF\languagename\endcsname - }% + \fc@multiling{ordinal}{F}% }% \def\@ordinalN{% - \@ifundefined{@ordinalN\languagename}% - {% - \PackageWarning{fmtcount}% - {No support for \string\ordinal\space - for language '\languagename'}% - \@ordinalMenglish - }% - {% - \csname @ordinalN\languagename\endcsname - }% + \fc@multiling{ordinal}{N}% }% \def\@ordinalstringM{% - \@ifundefined{@ordinalstringM\languagename}% - {% - \PackageWarning{fmtcount}% - {No support for \string\ordinalstring\space - for language '\languagename'}% - \@ordinalstringMenglish - }% - {% - \csname @ordinalstringM\languagename\endcsname - }% + \fc@multiling{ordinalstring}{M}% }% \def\@ordinalstringF{% - \@ifundefined{@ordinalstringF\languagename}% - {% - \PackageWarning{fmtcount}% - {No support for \string\ordinalstring\space - for language '\languagename'}% - \@ordinalstringMenglish - }% - {% - \csname @ordinalstringF\languagename\endcsname - }% + \fc@multiling{ordinalstring}{F}% }% \def\@ordinalstringN{% - \@ifundefined{@ordinalstringN\languagename}% - {% - \PackageWarning{fmtcount}% - {No support for \string\ordinalstring\space - for language '\languagename'}% - \@ordinalstringMenglish - }% - {% - \csname @ordinalstringN\languagename\endcsname - }% + \fc@multiling{ordinalstring}{N}% }% \def\@OrdinalstringM{% - \@ifundefined{@OrdinalstringM\languagename}% - {% - \PackageWarning{fmtcount}% - {No support for \string\Ordinalstring\space - for language '\languagename'}% - \@OrdinalstringMenglish - }% - {% - \csname @OrdinalstringM\languagename\endcsname - }% + \fc@multiling{Ordinalstring}{M}% }% \def\@OrdinalstringF{% - \@ifundefined{@OrdinalstringF\languagename}% - {% - \PackageWarning{fmtcount}% - {No support for \string\Ordinalstring\space - for language '\languagename'}% - \@OrdinalstringMenglish - }% - {% - \csname @OrdinalstringF\languagename\endcsname - }% + \fc@multiling{Ordinalstring}{F}% }% \def\@OrdinalstringN{% - \@ifundefined{@OrdinalstringN\languagename}% - {% - \PackageWarning{fmtcount}% - {No support for \string\Ordinalstring\space - for language '\languagename'}% - \@OrdinalstringMenglish - }% - {% - \csname @OrdinalstringN\languagename\endcsname - }% + \fc@multiling{Ordinalstring}{N}% }% } \@ifpackageloaded{babel}% |