summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/fmtcount
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-08-14 23:05:07 +0000
committerKarl Berry <karl@freefriends.org>2006-08-14 23:05:07 +0000
commit27faeceacd441677a049a895ea70fd4691c8c6e0 (patch)
tree0ba876645ca2406adfaec0ad3b63ab50958acc8e /Master/texmf-dist/source/latex/fmtcount
parente4fbc549355ed2057326cf7c0a4cf111971c4d24 (diff)
fmtcount (30jul06)
git-svn-id: svn://tug.org/texlive/trunk@1961 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/fmtcount')
-rw-r--r--Master/texmf-dist/source/latex/fmtcount/fmtcount.dtx59
-rw-r--r--Master/texmf-dist/source/latex/fmtcount/fmtcount.ins4
2 files changed, 43 insertions, 20 deletions
diff --git a/Master/texmf-dist/source/latex/fmtcount/fmtcount.dtx b/Master/texmf-dist/source/latex/fmtcount/fmtcount.dtx
index fe7f838d450..0c2b01910aa 100644
--- a/Master/texmf-dist/source/latex/fmtcount/fmtcount.dtx
+++ b/Master/texmf-dist/source/latex/fmtcount/fmtcount.dtx
@@ -1,5 +1,5 @@
%\iffalse
-% fmtcount.dtx generated using makedtx version 0.9b (c) Nicola Talbot
+% fmtcount.dtx generated using makedtx version 0.91b (c) Nicola Talbot
% Command line args:
% -macrocode ".*\.perl"
% -setambles ".*\.perl=>\nopreamble\nopostamble"
@@ -12,7 +12,7 @@
% -author "Nicola Talbot"
% -dir "source"
% fmtcount
-% Created on 2005/7/1 14:39
+% Created on 2006/7/29 14:54
%\fi
%\iffalse
%<*package>
@@ -35,7 +35,7 @@
%\fi
% \iffalse
% Doc-Source file to use with LaTeX2e
-% Copyright (C) 2005 Nicola Talbot, all rights reserved.
+% Copyright (C) 2006 Nicola Talbot, all rights reserved.
% \fi
% \iffalse
%<*driver>
@@ -50,7 +50,7 @@
-\newcommand{\stynamefmt}[1]{\textsf{#1}}
+\newcommand{\styname}[1]{\textsf{#1}}\newcommand{\clsname}[1]{\textsf{#1}}
\begin{document}
\DocInput{fmtcount.dtx}
\end{document}
@@ -59,19 +59,19 @@
%
%\RecordChanges
%\OnlyDescription
-%\def\filedate{20 June 2005}
-%\def\fileversion{1.03}
+%\def\filedate{29 July 2006}
+%\def\fileversion{1.04}
%\def\filename{fmtcount.dtx}
-%\def\docdate{1 July 2005}
+%\def\docdate{29 July 2006}
%
% \title{fmtcount.sty v\fileversion: Displaying the Values of
%\LaTeX\ Counters}
-% \author{N.L.C. Talbot}
+% \author{Nicola L.C. Talbot}
% \date{\docdate}
% \maketitle
% \tableofcontents
% \section{Introduction}
-%The \stynamefmt{fmtcount} package provides commands to display
+%The \styname{fmtcount} package provides commands to display
%the values of \LaTeX\ counters in a variety of formats. It also
%provides equivalent commands for actual numbers rather than
%counter names. Limited multilingual support is available.
@@ -107,6 +107,14 @@
% For example, if the current section is 3, then \verb"\ordinal{section}" will produce
% the output: 3\textsuperscript{rd}.
%
+%\textbf{Note:} the \clsname{memoir} class also defines a command called
+%\verb"\ordinal" which takes a number as an argument instead of a
+%counter. In order to overcome this incompatiblity, if you want
+%to use the \styname{fmtcount} package with the \clsname{memoir} class
+%you should use \verb"\FCordinal" to access \styname{fmtcount}'s
+%version of \verb"\ordinal", and use \verb"\ordinal" to use
+%\clsname{memoir}'s version of that command.
+%
%\DescribeMacro{\ordinalnum}
%The macro \verb"\ordinalnum" is like \verb!\ordinal!
%but takes an actual number rather than a counter as the
@@ -279,12 +287,12 @@
%
%\section{Multilingual Support}
%
-%Version 1.02 of the \stynamefmt{fmtcount} package now has
+%Version 1.02 of the \styname{fmtcount} package now has
%limited multilingual support. The following languages are
%implemented: English, Spanish, Portuguese, French, French (Swiss)
%and French (Belgian). The package checks to see if the
%command \verb"\date"\meta{language} is defined\footnote{this
-%will be true if you have loaded \stynamefmt{babel}}, and will
+%will be true if you have loaded \styname{babel}}, and will
%load the code for those languages. The commands \verb"\ordinal",
%\verb"\ordinalstring" and \verb'\numberstring' (and their
%variants) will then be formatted in the currently
@@ -319,10 +327,10 @@
%
%You can save your preferred default settings to a file called
%\texttt{fmtcount.cfg}, and place it on the \TeX\ path. These
-%settings will then be loaded by the \stynamefmt{fmtcount}
+%settings will then be loaded by the \styname{fmtcount}
%package.
%
-%Note that if you are using the \stynamefmt{datetime} package,
+%Note that if you are using the \styname{datetime} package,
%the \texttt{datetime.cfg} configuration file will override
%the \texttt{fmtcount.cfg} configuration file.
%For example, if \texttt{datetime.cfg} has the line:
@@ -2979,7 +2987,7 @@ this number}%
% This section deals with the code for |fmtcount.sty|
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{fmtcount}[2005/06/20 v1.03]
+\ProvidesPackage{fmtcount}[2006/07/29 v1.04]
\RequirePackage{ifthen}
\RequirePackage{keyval}
% \end{macrocode}
@@ -3326,11 +3334,22 @@ or `user'}}}
% the cross-referencing stuff working, which is why
% the optional argument comes \emph{after} the compulsory
% argument, instead of the usual manner of placing it before.
+% Version 1.04 changed \verb"\ordinal" to \verb"\FCordinal"
+% to prevent it clashing with the memoir class.
% \begin{macrocode}
-\newcommand{\ordinal}[1]{%
+\newcommand{\FCordinal}[1]{%
\expandafter\protect\expandafter\ordinalnum{%
\expandafter\the\csname c@#1\endcsname}}
-
+% \end{macrocode}
+% If \verb"\ordinal" isn't defined make "\ordinal" a synonym
+% for \verb"\FCordinal" to maintain compatibility with previous
+% versions.
+% \begin{macrocode}
+\@ifundefined{ordinal}{\let\ordinal\FCordinal}{%
+\PackageWarning{fmtcount}{\string\ordinal
+\space already defined use \string\FCordinal \space instead.}}
+% \end{macrocode}
+% \begin{macrocode}
\newcommand{\ordinalnum}[1]{\@ifnextchar[{\@ordinalnum{#1}}{%
\@ordinalnum{#1}[m]}}
@@ -3338,8 +3357,8 @@ or `user'}}}
\ifthenelse{\equal{#2}{f}}{%
\protect\@ordinalF{#1}}{%
\ifthenelse{\equal{#2}{m}}{}{%
-\PackageError{fmtcount}{Invalid gender option `#2' to
-\string\ordinal}{Available options are m or f}}%
+\PackageError{fmtcount}{Invalid gender option `#2'}{%
+Available options are m or f}}%
\protect\@ordinalM{#1}}}
\newcommand{\ordinalstring}[1]{%
@@ -3656,6 +3675,10 @@ sub do_cmd_ordinalnum{
join('', $num, "\\fmtord${OP}$br_id${CP}$suffix${OP}$br_id${CP}", $_[0]);
}
+sub do_cmd_FCordinal{
+ &do_cmd_ordinal;
+}
+
sub do_cmd_ordinal{
local($ctr, $val, $id, $_) = &read_counter_value($_[0]);
local($gender)='m';
diff --git a/Master/texmf-dist/source/latex/fmtcount/fmtcount.ins b/Master/texmf-dist/source/latex/fmtcount/fmtcount.ins
index c1ed2c10e64..52330ee2eff 100644
--- a/Master/texmf-dist/source/latex/fmtcount/fmtcount.ins
+++ b/Master/texmf-dist/source/latex/fmtcount/fmtcount.ins
@@ -1,8 +1,8 @@
-% fmtcount.ins generated using makedtx version 0.9b 2005/7/1 14:39
+% fmtcount.ins generated using makedtx version 0.91b 2006/7/29 14:54
\input docstrip
\preamble
-Copyright (C) 2005 Nicola Talbot, all rights reserved.
+Copyright (C) 2006 Nicola Talbot, all rights reserved.
If you modify this file, you must change its name first.
You are NOT ALLOWED to distribute this file alone. You are NOT
ALLOWED to take money for the distribution or use of either this