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/source/latex/fmtcount | |
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/source/latex/fmtcount')
-rw-r--r-- | Master/texmf-dist/source/latex/fmtcount/fmtcount.dtx | 243 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/fmtcount/fmtcount.ins | 2 |
2 files changed, 84 insertions, 161 deletions
diff --git a/Master/texmf-dist/source/latex/fmtcount/fmtcount.dtx b/Master/texmf-dist/source/latex/fmtcount/fmtcount.dtx index c26a89f864e..dd8870e6d2d 100644 --- a/Master/texmf-dist/source/latex/fmtcount/fmtcount.dtx +++ b/Master/texmf-dist/source/latex/fmtcount/fmtcount.dtx @@ -6,7 +6,7 @@ % -doc "fmtcount-manual.tex" % -author "Nicola Talbot and Vincent Belaïche" % fmtcount -% Created on 2012/9/28 8:43 +% Created on 2012/10/24 14:20 %\fi %\iffalse %<*package> @@ -52,7 +52,7 @@ pdftitle={fmtcount.sty: Displaying the Values of LaTeX Counters}, pdfkeywords={LaTeX,counter}]{hyperref} -\CheckSum{9034} +\CheckSum{8940} \doxitem{Option}{option}{options} @@ -71,7 +71,7 @@ % \url{www.dickimaw-books.com} % \and % Vincent Belaïche} -% \date{2012-09-28 (version 2.01)\relax +% \date{2012-10-24 (version 2.02)\relax %} % \maketitle % \tableofcontents @@ -814,7 +814,7 @@ %<*fcnumparser.sty> % \end{macrocode} %\fi -%\subsubsection{fcnumparser.sty} +%\subsection{fcnumparser.sty} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{fcnumparser}[2012/09/28] @@ -2007,10 +2007,11 @@ % This section deals with the code for |fmtcount.sty| % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{fmtcount}[2012/09/28 v2.01] +\ProvidesPackage{fmtcount}[2012/10/24 v2.02] \RequirePackage{ifthen} \RequirePackage{keyval} \RequirePackage{etoolbox} +\RequirePackage{fcprefix} % \end{macrocode} % \changes{1.3}{2007/7/19}{no %longer using xspace package} @@ -2047,16 +2048,32 @@ % %\begin{macro}{\FCloadlang} %changes{2.0}{2012-06-18}{new} +%changes{2.02}{2012-10-24}{ensured catcode for @ set to `letter' +%before loading file} %\begin{definition} %\cs{FCloadlang}\marg{language} %\end{definition} % Load \styfmt{fmtcount} language file, % \texttt{fc-}\meta{language}\texttt{.def}, unless already loaded. % \begin{macrocode} +\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}% }% } % \end{macrocode} @@ -3455,6 +3472,47 @@ } % \end{macrocode} %\end{macro} +% +%\begin{macro}{\fc@multiling} +%changes{2.02}{2012-10-24}{new} +%\cs{fc@multiling}\marg{name}\marg{gender} +% \begin{macrocode} +\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}}% + {% + \FCloadlang{english}% + }% + {% + }% + \ifcsdef{@#1#2\fc@mainlang}% + {% + \csuse{@#1#2\fc@mainlang}% + }% + {% + \PackageWarningNoLine{fmtcount}% + {No languages loaded at all! Loading english definitions}% + \FCloadlang{english}% + \def\fc@mainlang{english}% + \csuse{@#1#2english}% + }% + }% + {% + \csuse{@#1#2\languagename}% + }% +} +% \end{macrocode} +%\end{macro} %\begin{macro}{\@set@mulitling@fmtcount} % This defines the number and ordinal string macros to use % \cs{languagename}: @@ -3466,226 +3524,91 @@ % The masculine version of \cs{numberstring}: % \begin{macrocode} \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}% }% % \end{macrocode} % The feminine version of \cs{numberstring}: % \begin{macrocode} \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}% }% % \end{macrocode} % The neuter version of \cs{numberstring}: % \begin{macrocode} \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}% }% % \end{macrocode} % The masculine version of \cs{Numberstring}: % \begin{macrocode} \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}% }% % \end{macrocode} % The feminine version of \cs{Numberstring}: % \begin{macrocode} \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}% }% % \end{macrocode} % The neuter version of \cs{Numberstring}: % \begin{macrocode} \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}% }% % \end{macrocode} % The masculine version of \cs{ordinal}: % \begin{macrocode} \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}% }% % \end{macrocode} % The feminine version of \cs{ordinal}: % \begin{macrocode} \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}% }% % \end{macrocode} % The neuter version of \cs{ordinal}: % \begin{macrocode} \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}% }% % \end{macrocode} % The masculine version of \cs{ordinalstring}: % \begin{macrocode} \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}% }% % \end{macrocode} % The feminine version of \cs{ordinalstring}: % \begin{macrocode} \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}% }% % \end{macrocode} % The neuter version of \cs{ordinalstring}: % \begin{macrocode} \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}% }% % \end{macrocode} % The masculine version of \cs{Ordinalstring}: % \begin{macrocode} \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}% }% % \end{macrocode} % The feminine version of \cs{Ordinalstring}: % \begin{macrocode} \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}% }% % \end{macrocode} % The neuter version of \cs{Ordinalstring}: % \begin{macrocode} \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}% }% } % \end{macrocode} @@ -4389,14 +4312,13 @@ this number}% % \subsubsection{fc-french.def} % Definitions for French. % \begin{macrocode} -\ProvidesFCLanguage{french}[2012/06/18] +\ProvidesFCLanguage{french}[2012/10/24] % \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 reference: % \uref{http://www.alain.be/boece/noms\_de\_nombre.html} -% \begin{macrocode} -\RequirePackage{fcprefix} -% \end{macrocode} +% (Package now loaded by \sty{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 % \begin{tabularx}{\linewidth}{@{}>{\raggedleft\arraybackslash\ttfamily}rX@{}} @@ -5973,7 +5895,8 @@ z\'ero% % \end{macrocode} \iffalse Local variables: \fi \iffalse mode: docTeX \fi -\iffalse End: \fi%\iffalse +\iffalse End: \fi +%\iffalse % \begin{macrocode} %</fc-french.def> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/fmtcount/fmtcount.ins b/Master/texmf-dist/source/latex/fmtcount/fmtcount.ins index f3c88d67a74..9a1e0f36d8b 100644 --- a/Master/texmf-dist/source/latex/fmtcount/fmtcount.ins +++ b/Master/texmf-dist/source/latex/fmtcount/fmtcount.ins @@ -1,4 +1,4 @@ -% fmtcount.ins generated using makedtx version 0.94b 2012/9/28 8:43 +% fmtcount.ins generated using makedtx version 0.94b 2012/10/24 14:20 \input docstrip \preamble |