summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/fmtcount
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-09-19 22:07:26 +0000
committerKarl Berry <karl@freefriends.org>2017-09-19 22:07:26 +0000
commitbfd07842d2d959cfcf25115db678791bc9f929ba (patch)
treec15650c728f4db50ba1ac7e42fad4795235c23a0 /Master/texmf-dist/source/latex/fmtcount
parent1fed9c611dac053f39781da462cb70f542c11d61 (diff)
fmtcount (19sep17)
git-svn-id: svn://tug.org/texlive/trunk@45344 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/fmtcount')
-rw-r--r--Master/texmf-dist/source/latex/fmtcount/fmtcount.dtx320
-rw-r--r--Master/texmf-dist/source/latex/fmtcount/fmtcount.ins8
2 files changed, 168 insertions, 160 deletions
diff --git a/Master/texmf-dist/source/latex/fmtcount/fmtcount.dtx b/Master/texmf-dist/source/latex/fmtcount/fmtcount.dtx
index 241356d5d0e..68456a33e5c 100644
--- a/Master/texmf-dist/source/latex/fmtcount/fmtcount.dtx
+++ b/Master/texmf-dist/source/latex/fmtcount/fmtcount.dtx
@@ -1,11 +1,11 @@
%\iffalse
-% fmtcount.dtx generated using makedtx version 0.94b (c) Nicola Talbot
+% fmtcount.dtx generated using makedtx version 1.2 (c) Nicola Talbot
% Command line args:
-% -src "(.+)\.(sty|def)$=>\1.\2"
% -doc "fmtcount-manual.tex"
-% -author "Nicola Talbot and Vincent Belaïche"
+% -src "(.+)\.(sty|def)$=>\1.\2"
+% -author "Nicola Talbot and Vincent Belaïche"
% fmtcount
-% Created on 2017/7/21 12:28
+% Created on 2017/9/17 22:04
%\fi
%\iffalse
%<*package>
@@ -28,7 +28,7 @@
%\fi
% \iffalse
% Doc-Source file to use with LaTeX2e
-% Copyright (C) 2017 Nicola Talbot and Vincent Belaïche, all rights reserved.
+% Copyright (C) 2017 Nicola Talbot and Vincent Belaïche, all rights reserved.
% \fi
% \iffalse
%<*driver>
@@ -77,7 +77,7 @@
pdftitle={fmtcount.sty: Displaying the Values of LaTeX Counters},
pdfkeywords={LaTeX,counter}]{hyperref}
-\CheckSum{10157}
+\CheckSum{10120}
\doxitem{Option}{option}{options}
@@ -104,7 +104,7 @@
% \url{www.dickimaw-books.com}
% \and
% Vincent Bela\"iche}
-% \date{2017-07-21 (version 3.03)\relax
+% \date{2017-09-16 (version 3.04)\relax
%}
% \maketitle
% \tableofcontents
@@ -7262,17 +7262,17 @@ this number}%
% This section deals with the code for |fmtcount.sty|
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{fmtcount}[2017/07/21 v3.03]
+\ProvidesPackage{fmtcount}[2017/09/16 v3.04]
\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
+% \changes{3.01}{2014/12/03}{Use \styfmt{xkeyval} instead of \styfmt{keyval}, so that we do not get in trouble
% with bracket spurious removals}
% \begin{macrocode}
\RequirePackage{xkeyval}
\RequirePackage{etoolbox}
\RequirePackage{fcprefix}
% \end{macrocode}
-% \changes{3.00}{2014-07-18}{Add \cs{RequirePackage} for \texttt{ifxetex}}
+% \changes{3.00}{2014/07/3}{Add \cs{RequirePackage} for \texttt{ifxetex}}
% \begin{macrocode}
\RequirePackage{ifxetex}
% \end{macrocode}
@@ -7291,8 +7291,8 @@ this number}%
%
% Define the macro to format the |st|, |nd|, |rd| or |th| of an
% ordinal.
-% \changes{3.01}{2014-12-18}{Make \cs{fmtord} language dependent.}
-% \changes{3.01}{2014-12-21}{Substitute \cs{textsuperscript} for \cs{fc@textsuperscript}, and define
+% \changes{3.01}{2014/12/3}{Make \cs{fmtord} language dependent.}
+% \changes{3.01}{2014/12/3}{Substitute \cs{textsuperscript} for \cs{fc@textsuperscript}, and define
% \cs{fc@textsuperscript} as \cs{fup} when defined at beginning of document, or as \cs{textsuperscript}
% otherwise}
%\begin{macro}{\fc@orddef@ult}
@@ -7334,8 +7334,8 @@ this number}%
%\end{macro}
%
%\begin{macro}{\FCloadlang}
-%\changes{2.0}{2012-06-18}{new}
-%\changes{2.02}{2012-10-24}{ensured catcode for @ set to `letter'
+%\changes{2.0}{2012/06/3}{new}
+%\changes{2.02}{2012/10/3}{ensured catcode for @ set to `letter'
%before loading file}
%\begin{definition}
%\cs{FCloadlang}\marg{language}
@@ -7375,7 +7375,7 @@ this number}%
% \end{macrocode}
%\end{macro}
%\begin{macro}{\@FC@iflangloaded}
-%\changes{2.0}{2012-06-18}{new}
+%\changes{2.0}{2012/06/3}{new}
%\begin{definition}
%\cs{@FC@iflangloaded}\marg{language}\marg{true}\marg{false}
%\end{definition}
@@ -7388,7 +7388,7 @@ this number}%
% \end{macrocode}
%\end{macro}
%\begin{macro}{\ProvidesFCLanguage}
-%\changes{2.0}{2012-06-18}{new}
+%\changes{2.0}{2012/06/3}{new}
% Declare fmtcount language definition file. Adapted from
% \ics{ProvidesFile}.
% \begin{macrocode}
@@ -7418,7 +7418,7 @@ this number}%
% These two purposes cannot be handled in the same pass, we need two different passes otherwise there would
% be some corner cases when a package would be required --- as a result of loading language definition for
% one language --- between a \cs{DeclareOption} and a \cs{ProcessOption} which is forbidden by \LaTeXe.
-%\changes{3.00}{2014-07-18}{new}
+%\changes{3.00}{2014/07/3}{new}
% \begin{macrocode}
\newcommand*\fc@supported@language@list{%
english,%
@@ -7445,7 +7445,7 @@ italian}
% Now make some language iterator, note that for the following to work properly
% \cs{fc@supported@language@list} must not be empty. \meta{body} is a macro that takes one argument, and
% \cs{fc@iterate@on@languages} applies it iteratively :
-%\changes{3.00}{2014-07-18}{new}
+%\changes{3.00}{2014/07/03}{new}
% \begin{macrocode}
\newcommand*\fc@iterate@on@languages[1]{%
\ifx\fc@supported@language@list\@empty
@@ -7491,10 +7491,10 @@ italian}
% \item \meta{language} option has been passed to package \styfmt{fmtcount}.
% \end{itemize}
%
-%\changes{2.03}{2012-11-11}{renamed \cs{@fc@loadifbabelldf} to
+%\changes{2.03}{2012/11/03}{renamed \cs{@fc@loadifbabelldf} to
% \cs{@fc@loadifbabelorpolyglossialdf}}
-%\changes{2.03}{2012-11-11}{added check for polyglossia language}
-%\changes{3.00}{2014-07-18}{use \cs{ifxetex} to discriminate between \styfmt{babel} and \styfmt{polyglossia}}
+%\changes{2.03}{2012/11/03}{added check for polyglossia language}
+%\changes{3.00}{2014/07/03}{use \cs{ifxetex} to discriminate between \styfmt{babel} and \styfmt{polyglossia}}
% \begin{macrocode}
\newcommand*{\@fc@loadifbabelorpolyglossialdf}[1]{%
\ifxetex
@@ -7507,12 +7507,12 @@ italian}
%\end{macro}
%
% Load appropriate language definition files:
-%\changes{1.1}{14 June 2007}{added check for UKenglish,
+%\changes{1.1}{2007/06/14}{added check for UKenglish,
% british and USenglish babel settings}
-%\changes{2.0}{2012-06-18}{changed check for \cs{l@}\meta{language}
+%\changes{2.0}{2012/06/03}{changed check for \cs{l@}\meta{language}
% to check for \cs{date}\meta{language}}
-%\changes{3.00}{2014-07-18}{use iterator rather than doing it flat on each language}
-%\changes{3.01}{2014-12-18}{Define language aliases to \cs{fmtord}
+%\changes{3.00}{2014/07/03}{use iterator rather than doing it flat on each language}
+%\changes{3.01}{2014/12/03}{Define language aliases to \cs{fmtord}
% option dependent on ``true'' language .}
% \begin{macrocode}
\fc@iterate@on@languages\@fc@loadifbabelorpolyglossialdf
@@ -7578,7 +7578,7 @@ italian}
% \end{macrocode}
%\begin{option}{fmtord}
% Key to determine how to display the ordinal
-% \changes{3.01}{2014-12-18}{Apply option directly, rather than doing a border effect on \cs{fmtcount@fmtord},
+% \changes{3.01}{2014/12/03}{Apply option directly, rather than doing a border effect on \cs{fmtcount@fmtord},
% and then postprocessing depending on \cs{fmtcount@fmtord} at the end of \cs{fmtcountsetoptions}}
% \begin{macrocode}
\def\fc@set@ord@as@level#1{%
@@ -7610,7 +7610,7 @@ italian}
% \begin{macrocode}
\newif\iffmtord@abbrv
% \end{macrocode}
-% \changes{3.01}{2014-11-12}{Make `true' the default for option
+% \changes{3.01}{2014/11/03}{Make `true' the default for option
% `abbr', as in French this is the correct behaviour, and currently
% only French uses that}
% \begin{macrocode}
@@ -7630,7 +7630,7 @@ italian}
% \end{macrocode}
%\end{macro}
%\begin{option}{prefix}
-%\changes{2.0}{2012-06-18}{new}
+%\changes{2.0}{2012/06/03}{new}
% \begin{macrocode}
\define@key{fmtcount}{prefix}[scale=long]{%
\RequirePackage{fmtprefix}%
@@ -7640,7 +7640,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/03}{Move French specific stuff to \styfmt{french.def}.}
% \begin{macrocode}
\def\fmtcountsetoptions{%
\def\fmtcount@fmtord{}%
@@ -7650,7 +7650,7 @@ italian}
% Load configuration file if it exists. This needs to be done
% before the package options, to allow the user to override
% the settings in the configuration file.
-%\changes{2.0}{2012-06-18}{Now no message if fmtcount.cfg not found}
+%\changes{2.0}{2012/06/03}{Now no message if fmtcount.cfg not found}
% \begin{macrocode}
\InputIfFileExists{fmtcount.cfg}%
{%
@@ -7660,7 +7660,7 @@ italian}
}
% \end{macrocode}
%\begin{macro}{\fmtcount@loaded@by@option@lang@list}
-% \changes{3.01}{2014-10-15}{Declare language option so that actual loading happens after \cs{ProcessOptions},
+% \changes{3.01}{2014/10/03}{Declare language option so that actual loading happens after \cs{ProcessOptions},
% and the \cs{ProcessOption} only registers the language for loading.}
% \begin{macrocode}
\newcommand*{\fmtcount@loaded@by@option@lang@list}{}
@@ -7694,11 +7694,11 @@ italian}
% \end{macrocode}
%\end{option}
% Process package options
-% \changes{3.00}{2014-07-18}{Add \cs{relax} after \cs{ProcessOptions} like shown in \texttt{clsguide.pdf}}
+% \changes{3.00}{2014/07/03}{Add \cs{relax} after \cs{ProcessOptions} like shown in \texttt{clsguide.pdf}}
% \begin{macrocode}
\ProcessOptions\relax
% \end{macrocode}
-% \changes{3.01}{2014-10-15}{Load languages that have been registered for loading by package option.}
+% \changes{3.01}{2014/10/03}{Load languages that have been registered for loading by package option.}
% Now we do the loading of all languages that have been set by option to be loaded.
% \begin{macrocode}
\ifx\fmtcount@loaded@by@option@lang@list\@empty\else
@@ -7714,7 +7714,7 @@ italian}
%\begin{definition}
%\cs{@FCmodulo}\marg{count reg}\marg{n}
%\end{definition}
-%\changes{2.04}{2014-06-09}{renamed \cs{@modulo} to \cs{@FCmodulo}}
+%\changes{2.04}{2014/06/03}{renamed \cs{@modulo} to \cs{@FCmodulo}}
% Sets the count register to be its value modulo \meta{n}.
% This is used for the
% date, time, ordinal and numberstring commands. (The
@@ -7752,7 +7752,7 @@ italian}
\@DT@padzeroestrue
\@DT@loopN=17\relax
\@strctr=\@DT@loopN
- \whiledo{\@strctr<\c@padzeroesN}{0\advance\@strctr by 1}%
+ \whiledo{\@strctr<\c@padzeroesN}{0\advance\@strctr by \@ne}%
\@strctr=65536\relax
\@DT@X=#1\relax
\loop
@@ -7766,9 +7766,9 @@ italian}
\ifnum\@DT@modctr=0\else\@DT@padzeroesfalse\fi
\multiply\@DT@modctr by \@strctr
\advance\@DT@X by -\@DT@modctr
- \divide\@strctr by 2\relax
- \advance\@DT@loopN by -1\relax
- \ifnum\@strctr>1
+ \divide\@strctr by \tw@
+ \advance\@DT@loopN by \m@ne
+ \ifnum\@strctr>\@ne
\repeat
\the\@DT@X
}
@@ -7781,7 +7781,8 @@ italian}
%\changes{3.02}{2016/01/08}{Made robust using \texttt{etoolbox} \cs{newrobustcmd}}
% \begin{macrocode}
\newrobustcmd*{\@octal}[1]{%
- \ifnum#1>32768
+ \@DT@X=#1\relax
+ \ifnum\@DT@X>32768
\PackageError{fmtcount}%
{Value of counter too large for \protect\@octal}
{Maximum value 32768}
@@ -7789,9 +7790,8 @@ italian}
\@DT@padzeroestrue
\@DT@loopN=6\relax
\@strctr=\@DT@loopN
- \whiledo{\@strctr<\c@padzeroesN}{0\advance\@strctr by 1}%
+ \whiledo{\@strctr<\c@padzeroesN}{0\advance\@strctr by \@ne}%
\@strctr=32768\relax
- \@DT@X=#1\relax
\loop
\@DT@modctr=\@DT@X
\divide\@DT@modctr by \@strctr
@@ -7802,9 +7802,9 @@ italian}
\ifnum\@DT@modctr=0\else\@DT@padzeroesfalse\fi
\multiply\@DT@modctr by \@strctr
\advance\@DT@X by -\@DT@modctr
- \divide\@strctr by 8\relax
- \advance\@DT@loopN by -1\relax
- \ifnum\@strctr>1
+ \divide\@strctr by \@viiipt
+ \advance\@DT@loopN by \m@ne
+ \ifnum\@strctr>\@ne
\repeat
\the\@DT@X
\fi
@@ -7828,9 +7828,9 @@ italian}
% \begin{macrocode}
\newrobustcmd*{\@hexadecimal}[1]{%
\@DT@padzeroestrue
- \@DT@loopN=5\relax
+ \@DT@loopN=\@vpt
\@strctr=\@DT@loopN
- \whiledo{\@strctr<\c@padzeroesN}{0\advance\@strctr by 1}%
+ \whiledo{\@strctr<\c@padzeroesN}{0\advance\@strctr by \@ne}%
\@strctr=65536\relax
\@DT@X=#1\relax
\loop
@@ -7844,8 +7844,8 @@ italian}
\multiply\@DT@modctr by \@strctr
\advance\@DT@X by -\@DT@modctr
\divide\@strctr by 16\relax
- \advance\@DT@loopN by -1\relax
- \ifnum\@strctr>1
+ \advance\@DT@loopN by \m@ne
+ \ifnum\@strctr>\@ne
\repeat
\@@hexadecimal\@DT@X
}
@@ -7869,7 +7869,7 @@ italian}
\@DT@padzeroestrue
\@DT@loopN=5\relax
\@strctr=\@DT@loopN
- \whiledo{\@strctr<\c@padzeroesN}{0\advance\@strctr by 1}%
+ \whiledo{\@strctr<\c@padzeroesN}{0\advance\@strctr by \@ne}%
\@strctr=65536\relax
\@DT@X=#1\relax
\loop
@@ -7883,8 +7883,8 @@ italian}
\multiply\@DT@modctr by \@strctr
\advance\@DT@X by -\@DT@modctr
\divide\@strctr by 16\relax
- \advance\@DT@loopN by -1\relax
- \ifnum\@strctr>1
+ \advance\@DT@loopN by \m@ne
+ \ifnum\@strctr>\@ne
\repeat
\@@Hexadecimal\@DT@X
}
@@ -7894,22 +7894,26 @@ 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}
-\newrobustcmd*{\@aaalph}[1]{%
- \@DT@loopN=#1\relax
- \advance\@DT@loopN by -1\relax
+% \changes{3.02}{2016/01/08}{Made robust using \texttt{etoolbox} \cs{newrobustcmd}}
+% \changes{3.04}{2017/09/16}{Code optimization, use of \cs{@ne} and \cs{m@ne}, and assign \texttt{\#1} only
+% once. Factorize code with \cs{@AAAlph}.}
+% \begin{macrocode}
+\newrobustcmd*{\@aaalph}{\fc@aaalph\@alph}
+\newcommand*\fc@aaalph[2]{%
+ \@DT@loopN=#2\relax
+ \@DT@X\@DT@loopN
+ \advance\@DT@loopN by \m@ne
\divide\@DT@loopN by 26\relax
\@DT@modctr=\@DT@loopN
\multiply\@DT@modctr by 26\relax
- \@DT@X=#1\relax
- \advance\@DT@X by -1\relax
+ \advance\@DT@X by \m@ne
\advance\@DT@X by -\@DT@modctr
- \advance\@DT@loopN by 1\relax
- \advance\@DT@X by 1\relax
+ \advance\@DT@loopN by \@ne
+ \advance\@DT@X by \@ne
+ \edef\@tempa{#1\@DT@X}%
\loop
- \@alph\@DT@X
- \advance\@DT@loopN by -1\relax
+ \@tempa
+ \advance\@DT@loopN by \m@ne
\ifnum\@DT@loopN>0
\repeat
}
@@ -7919,25 +7923,10 @@ 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}}
+% \changes{3.02}{2016/01/08}{Made robust using \texttt{etoolbox} \cs{newrobustcmd}}
+% \changes{3.04}{2017/09/16}{Code optimization, factorize code with \@aaalph.}
% \begin{macrocode}
-\newrobustcmd*{\@AAAlph}[1]{%
- \@DT@loopN=#1\relax
- \advance\@DT@loopN by -1\relax
- \divide\@DT@loopN by 26\relax
- \@DT@modctr=\@DT@loopN
- \multiply\@DT@modctr by 26\relax
- \@DT@X=#1\relax
- \advance\@DT@X by -1\relax
- \advance\@DT@X by -\@DT@modctr
- \advance\@DT@loopN by 1\relax
- \advance\@DT@X by 1\relax
- \loop
- \@Alph\@DT@X
- \advance\@DT@loopN by -1\relax
- \ifnum\@DT@loopN>0
- \repeat
-}
+\newrobustcmd*{\@AAAlph}{\fc@aaalph\@Alph}%
\let\AAAlphnum=\@AAAlph
% \end{macrocode}
@@ -7945,31 +7934,36 @@ italian}
%\begin{macro}{\abalphnum}
% Lowercase alphabetical representation
%\changes{3.02}{2016/01/08}{Made robust using \texttt{etoolbox} \cs{newrobustcmd}}
-% \begin{macrocode}
-\newrobustcmd*{\@abalph}[1]{%
- \ifnum#1>17576\relax
+% \changes{3.04}{2017/09/16}{Code factorization with \cs{@ABAlph}. Code optimization, assign \texttt{\#1} only
+% once. Use \cs{@ne} and \cs{m@ne}.}
+% \begin{macrocode}
+\newrobustcmd*{\@abalph}{\fc@abalph\@alph}%
+\newcommand*\fc@abalph[2]{%
+ \@DT@X=#2\relax
+ \ifnum\@DT@X>17576\relax
+ \ifx#1\@alph\def\@tempa{\@abalph}%
+ \else\def\@tempa{\@ABAlph}\fi
\PackageError{fmtcount}%
- {Value of counter too large for \protect\@abalph}%
+ {Value of counter too large for \expandafter\protect\@tempa}%
{Maximum value 17576}%
\else
\@DT@padzeroestrue
\@strctr=17576\relax
- \@DT@X=#1\relax
- \advance\@DT@X by -1\relax
+ \advance\@DT@X by \m@ne
\loop
\@DT@modctr=\@DT@X
\divide\@DT@modctr by \@strctr
\ifthenelse{\boolean{@DT@padzeroes}
\and \(\@DT@modctr=1\)}%
- {}{\@alph\@DT@modctr}%
- \ifnum\@DT@modctr=1\else\@DT@padzeroesfalse\fi
+ {}{#1\@DT@modctr}%
+ \ifnum\@DT@modctr=\@ne\else\@DT@padzeroesfalse\fi
\multiply\@DT@modctr by \@strctr
\advance\@DT@X by -\@DT@modctr
\divide\@strctr by 26\relax
- \ifnum\@strctr>1
+ \ifnum\@strctr>\@ne
\repeat
- \advance\@DT@X by 1\relax
- \@alph\@DT@X
+ \advance\@DT@X by \@ne
+ #1\@DT@X
\fi
}
@@ -7979,33 +7973,9 @@ italian}
%\begin{macro}{\ABAlphnum}
% Uppercase alphabetical representation
%\changes{3.02}{2016/01/08}{Made robust using \texttt{etoolbox} \cs{newrobustcmd}}
+%\changes{3.04}{2017/09/16}{Code optimization, factorize code with \cs{@abalph}.}
% \begin{macrocode}
-\newrobustcmd*{\@ABAlph}[1]{%
- \ifnum#1>17576\relax
- \PackageError{fmtcount}%
- {Value of counter too large for \protect\@ABAlph}%
- {Maximum value 17576}%
- \else
- \@DT@padzeroestrue
- \@strctr=17576\relax
- \@DT@X=#1\relax
- \advance\@DT@X by -1\relax
- \loop
- \@DT@modctr=\@DT@X
- \divide\@DT@modctr by \@strctr
- \ifthenelse{\boolean{@DT@padzeroes}\and
- \(\@DT@modctr=1\)}{}{\@Alph\@DT@modctr}%
- \ifnum\@DT@modctr=1\else\@DT@padzeroesfalse\fi
- \multiply\@DT@modctr by \@strctr
- \advance\@DT@X by -\@DT@modctr
- \divide\@strctr by 26\relax
- \ifnum\@strctr>1
- \repeat
- \advance\@DT@X by 1\relax
- \@Alph\@DT@X
- \fi
-}
-
+\newrobustcmd*{\@ABAlph}{\fc@abalph\@Alph}%
\let\ABAlphnum=\@ABAlph
% \end{macrocode}
%\end{macro}
@@ -8074,7 +8044,7 @@ italian}
% If \cs{ordinal} isn't defined make \cs{ordinal} a synonym
% for \cs{FCordinal} to maintain compatibility with previous
% versions.
-% \changes{3.00}{2014-07-18}{Use \cs{protect}, not \cs{string} in \cs{PackageWarning} to quote macros like
+% \changes{3.00}{2014/07/03}{Use \cs{protect}, not \cs{string} in \cs{PackageWarning} to quote macros like
% shown in \texttt{clsguide.pdf}}
% \begin{macrocode}
\ifcsundef{ordinal}
@@ -8091,9 +8061,12 @@ 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.}
+% \changes{3.02}{2015/08/03}{Make \cs{ordinalnum} robust.}
+% \changes{3.04}{2017/09/03}{Use \texttt{etoobox}'s \cs{newrobustcmd*} instead of \LaTeX\ kernel
+% \cs{DeclareRobustcommand*} in order to make \cs{ordinalnum} robust. This is preferable, e.g. w.r.t. \TeX 4ht
+% compilation.}
% \begin{macrocode}
-\DeclareRobustCommand*{\ordinalnum}[1]{%
+\newrobustcmd*{\ordinalnum}[1]{%
\new@ifnextchar[%
{\@ordinalnum{#1}}%
{\@ordinalnum{#1}[m]}%
@@ -8136,7 +8109,7 @@ 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
+% \changes{3.02}{2015/08/03}{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}
@@ -8202,10 +8175,13 @@ italian}
% 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}}
+% passing to \cs{ordinalstringnum}}%
+% \changes{3.03}{2017/09/14}{Suppress leading \cs{expandafter}'s, they are useless as \cs{ordinalstringnum} is
+% supposed to fully expand its argument, and place 3 \cs{expandafter}'s before \cs{the}\cs{value} for
+% compatibily with \texttt{glossaries}.}
% \begin{macrocode}
\newcommand*{\ordinalstring}[1]{%
- \expandafter\ordinalstringnum\expandafter{%
+ \ordinalstringnum{\expandafter\expandafter\expandafter
\the\value{#1}}%
}
% \end{macrocode}
@@ -8227,9 +8203,9 @@ italian}
%\end{macro}
%\begin{macro}{\@ordinal@string}
% Display ordinal as a string according to gender.
-% \changes{3.00}{2014-07-18}{Use \cs{protect}, not \cs{string} in \cs{PackageError} to quote macros like
+% \changes{3.00}{2014/07/03}{Use \cs{protect}, not \cs{string} in \cs{PackageError} to quote macros like
% shown in \texttt{clsguide.pdf}}
-% \changes{3.00}{2014-07-18}{Correct detailed error message, so `n' is one of available gender options}
+% \changes{3.00}{2014/07/03}{Correct detailed error message, so `n' is one of available gender options}
% \begin{macrocode}
\def\@ordinal@string#1[#2]{%
{%
@@ -8290,7 +8266,7 @@ italian}
%\end{macro}
%\begin{macro}{\@store@ordinal@string}
% Store textual representation of number according to gender.
-% \changes{3.00}{2014-07-18}{Use \cs{protect}, not \cs{string} in \cs{PackageWarning} to quote macros like
+% \changes{3.00}{2014/07/03}{Use \cs{protect}, not \cs{string} in \cs{PackageWarning} to quote macros like
% shown in \texttt{clsguide.pdf}}
% \begin{macrocode}
\def\@store@ordinal@string#1#2[#3]{%
@@ -8326,10 +8302,12 @@ italian}
% longer \cs{protect} as \cs{Ordinalstringnum} is made
% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before
% passing to \cs{Ordinalstringnum}}
+% \changes{3.03}{2017/09/14}{Suppress leading \cs{expandafter}'s, they are useless as \cs{Ordinalstringnum} is
+% supposed to fully expand its argument, and place 3 \cs{expandafter}'s before \cs{the}\cs{value} for
+% compatibily with \texttt{glossaries}.}
% \begin{macrocode}
\newcommand*{\Ordinalstring}[1]{%
- \expandafter\Ordinalstringnum\expandafter{%
- \the\value{#1}}%
+ \Ordinalstringnum{\expandafter\expandafter\expandafter\the\value{#1}}%
}
% \end{macrocode}
%\end{macro}
@@ -8494,7 +8472,7 @@ italian}
}%
}%
% \end{macrocode}
-% \changes{3.01}{2014-11-10}{Protect \cs{`}.}
+% \changes{3.01}{2014/11/03}{Protect \cs{`}.}
% \begin{macrocode}
\expandafter\protected@edef\csname @fcs@#1\endcsname{%
\noexpand\MakeUppercase{\@fc@ordstr}%
@@ -8510,9 +8488,12 @@ italian}
% longer \cs{protect} as \cs{ORDINALstringnum} is made
% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before
% passing to \cs{ORDINALstringnum}}
+% \changes{3.03}{2017/09/14}{Suppress leading \cs{expandafter}'s, they are useless as \cs{ORDINALstringnum} is
+% supposed to fully expand its argument, and place 3 \cs{expandafter}'s before \cs{the}\cs{value} for
+% compatibily with \texttt{glossaries}.}
% \begin{macrocode}
\newcommand*{\ORDINALstring}[1]{%
- \expandafter\ORDINALstringnum\expandafter{%
+ \ORDINALstringnum{\expandafter\expandafter\expandafter
\the\value{#1}%
}%
}
@@ -8623,9 +8604,12 @@ italian}
% longer \cs{protect} as \cs{numberstringnum} is made
% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before
% passing to \cs{numberstringnum}}
+% \changes{3.03}{2017/09/14}{Suppress leading \cs{expandafter}'s, they are useless as \cs{numberstringnum} is
+% supposed to fully expand its argument, and place 3 \cs{expandafter}'s before \cs{the}\cs{value} for
+% compatibily with \texttt{glossaries}.}
% \begin{macrocode}
\newcommand*{\numberstring}[1]{%
- \expandafter\numberstringnum\expandafter{%
+ \numberstringnum{\expandafter\expandafter\expandafter
\the\value{#1}}%
}
% \end{macrocode}
@@ -8737,9 +8721,12 @@ italian}
% longer \cs{protect} as \cs{Numberstringnum} is made
% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before
% passing to \cs{Numberstringnum}}
+% \changes{3.03}{2017/09/14}{Suppress leading \cs{expandafter}'s, they are useless as \cs{Numberstringnum} is
+% supposed to fully expand its argument, and place 3 \cs{expandafter}'s before \cs{the}\cs{value} for
+% compatibily with \texttt{glossaries}.}
% \begin{macrocode}
\newcommand*{\Numberstring}[1]{%
- \expandafter\Numberstringnum\expandafter{%
+ \Numberstringnum{\expandafter\expandafter\expandafter
\the\value{#1}}%
}
% \end{macrocode}
@@ -8853,9 +8840,12 @@ italian}
% longer \cs{protect} as \cs{NUMBERstringnum} is made
% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before
% passing to \cs{NUMBERstringnum}.}
+% \changes{3.03}{2017/09/14}{Suppress leading \cs{expandafter}'s, they are useless as \cs{NUMBERstringnum} is
+% supposed to fully expand its argument, and place 3 \cs{expandafter}'s before \cs{the}\cs{value} for
+% compatibily with \texttt{glossaries}.}
% \begin{macrocode}
\newcommand*{\NUMBERstring}[1]{%
- \expandafter\NUMBERstringnum\expandafter{%
+ \NUMBERstringnum{\expandafter\expandafter\expandafter
\the\value{#1}}%
}
% \end{macrocode}
@@ -8910,10 +8900,12 @@ italian}
% longer \cs{protect} as \cs{@binary} is made
% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before
% passing to \cs{@binary}}
+% \changes{3.03}{2017/09/14}{Suppress leading \cs{expandafter}'s, they are useless as \cs{@binary} is supposed
+% to fully expand its argument, and place 3 \cs{expandafter}'s before \cs{the}\cs{value} for compatibily with
+% \texttt{glossaries}.}
% \begin{macrocode}
\providecommand*{\binary}[1]{%
- \expandafter\@binary
- \expandafter{%
+ \@binary{\expandafter\expandafter\expandafter
\the\value{#1}}%
}
% \end{macrocode}
@@ -8926,10 +8918,12 @@ italian}
% longer \cs{protect} as \cs{@aaalph} is made
% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before
% passing to \cs{@aaalph}.}
+% \changes{3.03}{2017/09/14}{Suppress leading \cs{expandafter}'s, they are useless as \cs{@aaalph} is supposed
+% to fully expand its argument, and place 3 \cs{expandafter}'s before \cs{the}\cs{value} for compatibily with
+% \texttt{glossaries}.}
% \begin{macrocode}
\providecommand*{\aaalph}[1]{%
- \expandafter\@aaalph
- \expandafter{%
+ \@aaalph{\expandafter\expandafter\expandafter
\the\value{#1}}%
}
% \end{macrocode}
@@ -8941,10 +8935,12 @@ italian}
% longer \cs{protect} as \cs{@AAAlph} is made
% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before
% passing to \cs{@AAAlph}.}
+% \changes{3.03}{2017/09/14}{Suppress leading \cs{expandafter}'s, they are useless as \cs{@AAAlph} is supposed
+% to fully expand its argument, and place 3 \cs{expandafter}'s before \cs{the}\cs{value} for compatibily with
+% \texttt{glossaries}.}
% \begin{macrocode}
\providecommand*{\AAAlph}[1]{%
- \expandafter\@AAAlph
- \expandafter{%
+ \@AAAlph{\expandafter\expandafter\expandafter
\the\value{#1}}%
}
% \end{macrocode}
@@ -8957,10 +8953,12 @@ italian}
% longer \cs{protect} as \cs{@abalph} is made
% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before
% passing to \cs{@abalph}.}
+% \changes{3.03}{2017/09/14}{Suppress leading \cs{expandafter}'s, they are useless as \cs{@abalph} is supposed
+% to fully expand its argument, and place 3 \cs{expandafter}'s before \cs{the}\cs{value} for compatibily with
+% \texttt{glossaries}.}
% \begin{macrocode}
\providecommand*{\abalph}[1]{%
- \expandafter\@abalph
- \expandafter{%
+ \@abalph{\expandafter\expandafter\expandafter
\the\value{#1}}%
}
% \end{macrocode}
@@ -8972,10 +8970,12 @@ italian}
% longer \cs{protect} as \cs{@ABAlph} is made
% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before
% passing to \cs{@ABAlph}.}
+% \changes{3.03}{2017/09/14}{Suppress leading \cs{expandafter}'s, they are useless as \cs{@ABAlph} is supposed
+% to fully expand its argument, and place 3 \cs{expandafter}'s before \cs{the}\cs{value} for compatibily with
+% \texttt{glossaries}.}
% \begin{macrocode}
\providecommand*{\ABAlph}[1]{%
- \expandafter\@ABAlph
- \expandafter{%
+ \@ABAlph{\expandafter\expandafter\expandafter
\the\value{#1}}%
}
% \end{macrocode}
@@ -8987,10 +8987,12 @@ italian}
% longer \cs{protect} as \cs{@hexadecimal} is made
% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before
% passing to \cs{@hexadecimal}.}
+% \changes{3.03}{2017/09/14}{Suppress leading \cs{expandafter}'s, they are useless as \cs{@hexadecimal} is
+% supposed to fully expand its argument, and place 3 \cs{expandafter}'s before \cs{the}\cs{value} for
+% compatibily with \texttt{glossaries}.}
% \begin{macrocode}
\providecommand*{\hexadecimal}[1]{%
- \expandafter\@hexadecimal
- \expandafter{%
+ \@hexadecimal{\expandafter\expandafter\expandafter
\the\value{#1}}%
}
% \end{macrocode}
@@ -9002,10 +9004,12 @@ italian}
% longer \cs{protect} as \cs{@Hexadecimal} is made
% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before
% passing to \cs{@Hexadecimal}.}
+% \changes{3.03}{2017/09/14}{Suppress leading \cs{expandafter}'s, they are useless as \cs{@Hexadecimal} is
+% supposed to fully expand its argument, and place 3 \cs{expandafter}'s before \cs{the}\cs{value} for
+% compatibily with \texttt{glossaries}.}
% \begin{macrocode}
\providecommand*{\Hexadecimal}[1]{%
- \expandafter\@Hexadecimal
- \expandafter{%
+ \@Hexadecimal{\expandafter\expandafter\expandafter
\the\value{#1}}%
}
% \end{macrocode}
@@ -9017,10 +9021,12 @@ italian}
% longer \cs{protect} as \cs{@octal} is made
% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before
% passing to \cs{@octal}}
+% \changes{3.03}{2017/09/14}{Suppress leading \cs{expandafter}'s, they are useless as \cs{@octal} is supposed
+% to fully expand its argument, and place 3 \cs{expandafter}'s before \cs{the}\cs{value} for compatibily with
+% \texttt{glossaries}.}
% \begin{macrocode}
\providecommand*{\octal}[1]{%
- \expandafter\@octal
- \expandafter{%
+ \@octal{\expandafter\expandafter\expandafter
\the\value{#1}}%
}
% \end{macrocode}
@@ -9032,10 +9038,12 @@ italian}
% longer \cs{protect} as \cs{@decimal} is made
% robust. Expand \cs{the}\cs{value}\texttt{\{\#1\}} once before
% passing to \cs{@decimal}}
+% \changes{3.03}{2017/09/14}{Suppress leading \cs{expandafter}'s, they are useless as \cs{@decimal} is supposed
+% to fully expand its argument, and place 3 \cs{expandafter}'s before \cs{the}\cs{value} for compatibily with
+% \texttt{glossaries}.}
% \begin{macrocode}
\providecommand*{\decimal}[1]{%
- \expandafter\@decimal
- \expandafter{%
+ \@decimal{\expandafter\expandafter\expandafter
\the\value{#1}}%
}
% \end{macrocode}
@@ -9071,9 +9079,9 @@ italian}
%\end{macro}
%
%\begin{macro}{\fc@multiling}
-%\changes{2.02}{2012-10-24}{new}
+%\changes{2.02}{2012/10/03}{new}
%\cs{fc@multiling}\marg{name}\marg{gender}
-%\changes{3.00}{2014-07-18}{Use \cs{protect}, not \cs{string} in \cs{PackageWarning} to quote macros like
+%\changes{3.00}{2014/07/03}{Use \cs{protect}, not \cs{string} in \cs{PackageWarning} to quote macros like
% shown in \texttt{clsguide.pdf}}
% \begin{macrocode}
\newcommand*{\fc@multiling}[2]{%
@@ -9115,7 +9123,7 @@ italian}
%\begin{macro}{\@set@mulitling@fmtcount}
% This defines the number and ordinal string macros to use
% \cs{languagename}:
-%\changes{2.0}{2012-06-18}{changed errors to warnings for
+%\changes{2.0}{2012/06/03}{changed errors to warnings for
%unsupported languages}
% \begin{macrocode}
\def\@set@mulitling@fmtcount{%
@@ -9211,7 +9219,7 @@ italian}
}%
% \end{macrocode}
% Make \cs{fmtord} language dependent:
-% \changes{3.01}{2014-12-18}{Make \cs{fmtord} language dependent.}
+% \changes{3.01}{2014/12/03}{Make \cs{fmtord} language dependent.}
% \begin{macrocode}
\let\fmtord\fc@ord@multiling
}
@@ -9272,7 +9280,7 @@ italian}
}%
}
% \end{macrocode}
-% \changes{3.01}{2014-12-21}{Substitute \cs{textsuperscript} for \cs{fc@textsuperscript}, and define
+% \changes{3.01}{2014/12/03}{Substitute \cs{textsuperscript} for \cs{fc@textsuperscript}, and define
% \cs{fc@textsuperscript} as \cs{fup} when defined at beginning of document, or as \cs{textsuperscript}
% otherwise}
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/fmtcount/fmtcount.ins b/Master/texmf-dist/source/latex/fmtcount/fmtcount.ins
index ee23f77606a..34bd064a9be 100644
--- a/Master/texmf-dist/source/latex/fmtcount/fmtcount.ins
+++ b/Master/texmf-dist/source/latex/fmtcount/fmtcount.ins
@@ -1,14 +1,14 @@
-% fmtcount.ins generated using makedtx version 0.94b 2017/7/21 12:28
+% fmtcount.ins generated using makedtx version 1.2 2017/9/17 22:04
\input docstrip
\preamble
fmtcount.dtx
- Copyright 2017 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
- of this license of (at your option) any later version.
+ of this license or (at your option) any later version.
The latest version of this license is in
http://www.latex-project.org/lppl.txt
and version 1.3 or later is part of all distributions of LaTeX
@@ -16,7 +16,7 @@
This work has the LPPL maintenance status `maintained'.
- The Current Maintainer of this work is Nicola Talbot and Vincent Belaïche.
+ The Current Maintainer of this work is Nicola Talbot and Vincent Belaïche.
This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.