From 5972810af729299af222498461a459998df88906 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 25 Sep 2012 22:58:08 +0000 Subject: fmtcount (25sep12) git-svn-id: svn://tug.org/texlive/trunk@27805 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/fmtcount/CHANGES | 14 + Master/texmf-dist/doc/latex/fmtcount/README | 13 +- .../doc/latex/fmtcount/fc-frlargenum.tex | 128 ++++ Master/texmf-dist/doc/latex/fmtcount/fc-lang.tex | 9 +- Master/texmf-dist/doc/latex/fmtcount/fc-samp.tex | 4 +- .../doc/latex/fmtcount/fmtcount-manual.html | 708 --------------------- Master/texmf-dist/doc/latex/fmtcount/fmtcount.pdf | Bin 144823 -> 542352 bytes 7 files changed, 157 insertions(+), 719 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/fmtcount/fc-frlargenum.tex delete mode 100644 Master/texmf-dist/doc/latex/fmtcount/fmtcount-manual.html (limited to 'Master/texmf-dist/doc/latex/fmtcount') diff --git a/Master/texmf-dist/doc/latex/fmtcount/CHANGES b/Master/texmf-dist/doc/latex/fmtcount/CHANGES index 2bf2c037047..5b44dcb0cd2 100644 --- a/Master/texmf-dist/doc/latex/fmtcount/CHANGES +++ b/Master/texmf-dist/doc/latex/fmtcount/CHANGES @@ -1,5 +1,19 @@ fmtcount package versions: +Version 2.0: + + * fcprefix.sty, fcnumparser.sty added by Vincent Belaïche + + * fmtcount.sty now loads etoolbox + + * Minor corrections to fc-spanish.def (corrections provided by + Fernando Maldonado Millán) + + * Minor corrections to fc-german.def (corrections provided by + Dominik Waßenhoven) + + * Fixed bug in OrdinalstringMgerman etc + Version 1.31: * fixed unwanted space in \decimalnum diff --git a/Master/texmf-dist/doc/latex/fmtcount/README b/Master/texmf-dist/doc/latex/fmtcount/README index fa6dd14ad0c..6379b920313 100644 --- a/Master/texmf-dist/doc/latex/fmtcount/README +++ b/Master/texmf-dist/doc/latex/fmtcount/README @@ -1,14 +1,15 @@ -LaTeX Package : fmtcount v 1.31 +LaTeX Package : fmtcount v2.0 -Last Modified : 2 October 2009 +Last Modified : 2012-06-18 -Author : Nicola Talbot +Author : Nicola Talbot and Vincent Belaïche Files : fmtcount.dtx - documented source file fmtcount.ins - installation script fmtcount.perl - latex2html style file - fc-samp.tex - sample files - fc-lang.tex / + fc-samp.tex \ + fc-lang.tex - sample files + fc-frlargenum.tex / The package fmtcount.sty provides commands that display the value of a LaTeX counter in a variety @@ -49,4 +50,4 @@ This material is subject to the LaTeX Project Public License. See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for the details of that license. -http://theoval.cmp.uea.ac.uk/~nlct/ +http://www.dickimaw-books.com/ diff --git a/Master/texmf-dist/doc/latex/fmtcount/fc-frlargenum.tex b/Master/texmf-dist/doc/latex/fmtcount/fc-frlargenum.tex new file mode 100644 index 00000000000..cd5134b37c4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/fmtcount/fc-frlargenum.tex @@ -0,0 +1,128 @@ +\documentclass{article} +\usepackage[french]{babel} +\usepackage{fmtcount} +\usepackage{array} +\usepackage{amsmath} +\usepackage{xcolor} +\usepackage[T1]{fontenc} +\newcommand*\formatterundertest[1]{} +\makeatletter +\newcommand*{\printrow}[2]{% + \def\@tempa{#1}% + \ifx\@tempa\@empty\else + \texttt{\textbackslash fmtsetoptions\{french=\{#1\}\}}\newline + \fmtcountsetoptions{french={#1}}% + \fi + \begin{tabular}{@{}>{\raggedleft\arraybackslash}p{\dimexpr0.3\linewidth-\tabcolsep}>{\raggedright\arraybackslash}p{\dimexpr0.7\linewidth-\tabcolsep}@{}}% + #2&$\rangle$\formatterundertest{#2}$\langle$\\\hline + \end{tabular}\newline + \def\@tempb{% + \ifx\@tempa\space + \expandafter\@gobble + \fi + }% + \futurelet\@tempa\@tempb +} +\def\fc@frenchoptions@submillion@dos{$\bullet$\-$\bullet$} +\def\fc@frenchoptions@supermillion@dos{$\star$\-$\star$} + +\makeatother +\newcommand*\test{\noindent +\printrow{all plural}{1} +\printrow{}{2} +\printrow{}{3} +\printrow{}{4} +\printrow{}{5} +\printrow{}{6} +\printrow{}{7} +\printrow{}{8} +\printrow{}{9} +\printrow{}{10} +\printrow{}{11} +\printrow{}{12} +\printrow{}{13} +\printrow{}{14} +\printrow{}{15} +\printrow{}{16} +\printrow{}{17} +\printrow{}{18} +\printrow{}{19} +\printrow{}{20} +\printrow{}{21} +\printrow{}{22} +\printrow{}{29} +\printrow{scale=long}{1 000 000 000 000 000 000 000 000 000 000 000 000 000} +\printrow{scale=short}{1 000 000 000 000 000 000 000 000 000 000 000 000 000} +\printrow{scale=recursive}{1 000 000 000 000 000 000 000 000 000 000 000 000 000} +\printrow{}{1 000 000 000 000 000 000 000 000 000 000 000 000} +\printrow{}{1 000 000 000 000 000 000 000 000 000 000 000} +\printrow{}{1 000 000 000 000 000 000 000 000 000 000} +\printrow{scale=long}{2 000 000 000 000 000 000 000 000 000 000 000 000 000} +\printrow{scale=short}{2 000 000 000 000 000 000 000 000 000 000 000 000 000} +\printrow{scale=recursive}{2 000 000 000 000 000 000 000 000 000 000 000 000 000} +\printrow{}{2 000 000 000 000 000 000 000 000 000 000 000 000} +\printrow{}{2 000 000 000 000 000 000 000 000 000 000 000} +\printrow{}{2 000 000 000 000 000 000 000 000 000 000} +\printrow{}{156 404 724 555 428 769 499 217 321 941} +\printrow{}{4 171 764 135 702 262 349 567 001 574 584} +\printrow{}{97 415 427 916 562 250 398 973 107 371 704} +\printrow{}{80} +\printrow{}{81} +\printrow{}{21} +\printrow{}{31} +\printrow{}{200} +\printrow{}{201} +\printrow{}{200 000} +\printrow{}{200 000 000} +\printrow{}{201 000 000} +\printrow{}{80 000} +\printrow{}{80 000 000} +\printrow{}{81 000} +\printrow{}{81 000 000} +\printrow{all plural,mil plural=multiple}{1000} +\printrow{}{2000} +\printrow{}{1001} +\printrow{}{2001} +\printrow{}{1900} +\printrow{}{2012} +\printrow{}{900} +\printrow{all plural,mil plural=multiple,mil plural mark=s}{2000} +} + +\begin{document} + +\section{\textbackslash numberstringnum\{\#1\}} +\def\formatterundertest#1{\numberstringnum{#1}} +\test + +\section{\textbackslash numberstringnum\{\#1\}[f]} +\def\formatterundertest#1{\numberstringnum{#1}[f]} +\test + +\section{\textbackslash ordinalstringnum\{\#1\}} +\def\formatterundertest#1{\ordinalstringnum{#1}} +\test + +\section{\textbackslash ordinalstringnum\{\#1\}[f]} +\def\formatterundertest#1{\ordinalstringnum{#1}[f]} +\test + +\section{\textbackslash Numberstringnum\{\#1\}} +\def\formatterundertest#1{\Numberstringnum{#1}} +\test + +\section{\textbackslash Numberstringnum\{\#1\}[f]} +\def\formatterundertest#1{\Numberstringnum{#1}[f]} +\test + +\section{\textbackslash Ordinalstringnum\{\#1\}} +\def\formatterundertest#1{\Ordinalstringnum{#1}} +\test + +\section{\textbackslash Ordinalstringnum\{\#1\}[f]} +\def\formatterundertest#1{\Ordinalstringnum{#1}[f]} +\test + + + +\end{document} diff --git a/Master/texmf-dist/doc/latex/fmtcount/fc-lang.tex b/Master/texmf-dist/doc/latex/fmtcount/fc-lang.tex index 7a580a65cda..b2e52ba4164 100644 --- a/Master/texmf-dist/doc/latex/fmtcount/fc-lang.tex +++ b/Master/texmf-dist/doc/latex/fmtcount/fc-lang.tex @@ -1,9 +1,12 @@ % This is an interactive script. Run it through \LaTeX - % and enter appropriate responses. (This won't work with + % and enter appropriate responses. (This won't work with % LaTeX2HTML \documentclass[a4paper]{article} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} + \usepackage[french,english,spanish,portuges,ngerman,italian]{babel} \usepackage{fmtcount} @@ -256,14 +259,14 @@ Current language: Italian. \stepcounter{endval} \begin{ttfamily} -\noindent +\noindent \makebox[0.25in][c]{N} \makebox[0.5in][c]{ordinal}\quad \stringtype \par \myctr=\value{startval} \loop -\noindent +\noindent \setcounter{N}{\myctr} \makebox[0.25in][r]{\arabic{N}} \makebox[0.5in][r]{\ordinal{N}[\gender]}\quad diff --git a/Master/texmf-dist/doc/latex/fmtcount/fc-samp.tex b/Master/texmf-dist/doc/latex/fmtcount/fc-samp.tex index 7ca4d1c57f5..3730f0cf28b 100644 --- a/Master/texmf-dist/doc/latex/fmtcount/fc-samp.tex +++ b/Master/texmf-dist/doc/latex/fmtcount/fc-samp.tex @@ -19,10 +19,10 @@ \begin{document} \section{Displaying the value of a counter} -\label{ex} +\label{ex} \begin{ttfamily} -\noindent +\noindent \makebox[0.75in][c]{decimal} \makebox[0.75in][c]{hexadecimal} \makebox[0.75in][c]{ordinal} diff --git a/Master/texmf-dist/doc/latex/fmtcount/fmtcount-manual.html b/Master/texmf-dist/doc/latex/fmtcount/fmtcount-manual.html deleted file mode 100644 index 6b9887eafde..00000000000 --- a/Master/texmf-dist/doc/latex/fmtcount/fmtcount-manual.html +++ /dev/null @@ -1,708 +0,0 @@ - - - - - -fmtcount.sty v1.31: Displaying the Values of LaTeX Counters - - - - - - - - - - - - - - -

- -

fmtcount.sty v1.31: Displaying the Values of -LaTeX Counters

-

Nicola L.C. Talbot -
-
-School of Computing Sciences -
-University of East Anglia -
-Norwich. NR4 7TJ. -
-United Kingdom. -
http://theoval.cmp.uea.ac.uk/~nlct/

-

2nd October 2009

-
- -

-Contents -

- - - - -

-Introduction -

-The 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. -Currently, there is only support for English, French (including -Belgian and Swiss variations), Spanish, Portuguese, German and -Italian. - -

- -

-Installation -

- -

-This package is distributed with the files fmtcount.dtx -and fmtcount.ins. To extract the code do: -

-latex fmtcount.ins
-
-This will create the files fmtcount.sty and -fmtcount.perl, along with several .def files. -Place fmtcount.sty and the .def files somewhere -where LaTeX will find them (e.g. -texmf/tex/latex/fmtcount/) and place fmtcount.perl -somewhere where LaTeX2HTML -will find it (e.g. latex2html/styles). Remember to refresh -the TeX database (using texhash or mktexlsr -under Linux, for -other operating systems check the manual.) - -

- -

-Available Commands -

- -

-The commands can be divided into two categories: those that -take the name of a counter as the argument, and those -that take a number as the argument. - -

- -

-\ordinal{counter}[gender] -

-This will print the value of a LaTeX counter counter as an -ordinal, where the macro - -

-\fmtord{text} -

-is used to format the st, nd, rd, th bit. By default the ordinal is -formatted as a superscript, if the package option level is -used, it is level with the text. For example, if the current section -is 3, then \ordinal{section} will produce the output: -3rd. Note that the optional argument gender -occurs at the end. This argument may only take one of -the following values: m (masculine), f -(feminine) or n (neuter.) If gender is omitted, -or if the given gender has no meaning in the current language, -m is assumed. - -

-Notes: - -

    -
  1. the memoir class also defines a command called -\ordinal which takes a number as an argument instead of a -counter. In order to overcome this incompatiblity, if you want -to use the fmtcount package with the memoir class -you should use \FCordinal to access -fmtcount's version of \ordinal, and use -\ordinal to use memoir's version of that command. - -

    -

  2. -
  3. As with all commands which have an optional argument as the -last argument, if the optional argument is omitted, any spaces -following the final argument will be ignored. Whereas, if the -optional argument is present, any spaces following the optional -argument won't be ignored. so \ordinal{section} ! -will produce: 3rd! whereas - \ordinal{section}[m] ! will produce: -3rd ! -
  4. -
- -

- -

-\ordinalnum{n}[gender] -

-This is like \ordinal but takes an actual number rather than a -counter as the argument. For example: \ordinalnum{3} will -produce: 3rd. - -

- -

-\numberstring{counter}[gender] -

-This will print the value of counter as text. E.g. \numberstring{section} will produce: three. The optional -argument is the same as that for \ordinal. - -

- -

-\Numberstring{counter}[gender] -

-This does the same as \numberstring, but with initial letters in -uppercase. For example, \Numberstring{section} will produce: -Three. - -

- -

-\NUMBERstring{counter}[gender] -

-This does the same as \numberstring, but converts the string to -upper case. Note that -\MakeUppercase{\NUMBERstring{counter}} doesn't -work, due to the way that \MakeUppercase expands its -argument1. - -

- -

-\numberstringnum{n}[gender] -

- -

-\Numberstringnum{n}[gender] -

- -

-\NUMBERstringnum{n}[gender] -

-Theses macros work like -\numberstring, \Numberstring and \NUMBERstring, -respectively, but take an actual number -rather than a counter as the argument. For example: -\Numberstringnum{105} will produce: One Hundred and Five. - -

- -

-\ordinalstring{counter}[gender] -

-This will print the value of counter as a textual ordinal. -E.g. \ordinalstring{section} will produce: third. The -optional argument is the same as that for \ordinal. - -

- -

-\Ordinalstring{counter}[gender] -

-This does the same as \ordinalstring, but with initial letters in -uppercase. For example, \Ordinalstring{section} will produce: -Third. - -

- -

-\ORDINALstring{counter}[gender] -

-This does the same as \ordinalstring, but with all words in upper -case (see previous note about \MakeUppercase). - -

- -

-\ordinalstringnum{n}[gender] -

- -

-\Ordinalstringnum{n}[gender] -

- -

-\ORDINALstringnum{n}[gender] -

-These macros work like \ordinalstring, \Ordinalstring and -\ORDINALstring, respectively, but take an actual number rather -than a counter as the argument. For example, -\ordinalstringnum{3} will produce: third. - -

-As from version 1.09, textual representations can be stored for -later use. This overcomes the problems encountered when you -attempt to use one of the above commands in \edef. - -

-Each of the following commands takes a label as the first argument, -the other arguments are as the analogous commands above. These -commands do not display anything, but store the textual -representation. This can later be retrieved using - -

-\FMCuse{label} -

-Note: with \storeordinal and \storeordinalnum, the -only bit that doesn't get expanded is \fmtord. So, for -example, \storeordinalnum{mylabel}{3} will be stored as -3\relax \fmtord{rd}. - -

- -

-\storeordinal{label}{counter}[gender] -

- -

-\storeordinalstring{label}{counter}[gender] -

- -

-\storeOrdinalstring{label}{counter}[gender] -

- -

- -

-\storeORDINALstring{label}{counter}[gender] -

- -

-\storenumberstring{label}{counter}[gender] -

- -

-\storeNumberstring{label}{counter}[gender] -

- -

-\storeNUMBERstring{label}{counter}[gender] -

- -

-\storeordinalnum{label}{number}[gender] -

- -

-\storeordinalstring{label}{number}[gender] -

- -

-\storeOrdinalstringnum{label}{number}[gender] -

- -

-\storeORDINALstringnum{label}{number}[gender] -

- -

-\storenumberstring{label}{number}[gender] -

- -

-\storeNumberstring{label}{number}[gender] -

- -

-\storeNUMBERstring{label}{number}[gender] -

- -

- -

-\binary{counter} -

-This will print the -value of counter as a binary number. -E.g. \binary{section} will produce: 11. The declaration - -

-\padzeroes[n] -

-will ensure numbers are written to n digits, padding with -zeroes if necessary. E.g. \padzeroes[8]\binary{section} -will produce: 00000011. The default value for n is 17. - -

- -

-\binary{n} -

-This is like \binary but takes an actual number rather than a -counter as the argument. For example: \binarynum{5} will -produce: 101. - -

- -

-\octal{counter} -

-This will print the value of counter as an octal number. For -example, if you have a counter called, say mycounter, and -you set the value to 125, then \octal{mycounter} will produce: -177. Again, the number will be padded with zeroes if necessary, -depending on whether \padzeroes has been used. - -

- -

-\octalnum{n} -

-This is like \octal but takes an actual number rather than a -counter as the argument. For example: \octalnum{125} will -produce: 177. - -

- -

-\hexadecimal{counter} -

-This will print the value of counter as a hexadecimal number. -Going back to the counter used in the previous example, -\hexadecimal{mycounter} will produce: 7d. Again, the number -will be padded with zeroes if necessary, depending on whether -\padzeroes has been used. - -

- -

-\Hexadecimal{counter} -

-This does the same thing, but uses uppercase characters, e.g. \Hexadecimal{mycounter} will produce: 7D. - -

- -

-\hexadecimalnum{n} -

- -

-\Hexadecimalnum{n} -

-These are like \hexadecimal and \Hexadecimal -but take an actual number rather than a counter as the -argument. For example: \hexadecimalnum{125} will -produce: 7d, and \Hexadecimalnum{125} will -produce: 7D. - -

- -

-\decimal{counter} -

-This is similar to \arabic but the number can be padded with -zeroes depending on whether \padzeroes has been used. For -example: \padzeroes[8]\decimal{section} will produce: -00000005. - -

- -

-\decimalnum{n} -

-This is like \decimal but takes an actual number rather than a -counter as the argument. For example: -\padzeroes[8]\decimalnum{5} will produce: 00000005. - -

- -

-\aaalph{counter} -

-This will print the value of counter as: a b ... z aa bb -... zz etc. For example, \aaalpha{mycounter} will -produce: uuuuu if mycounter is set to 125. - -

- -

-\AAAlph{counter} -

-This does the same thing, but uses uppercase characters, e.g. \AAAlph{mycounter} will produce: UUUUU. - -

- -

-\aaalphnum{n} -

- -

-\AAAlphnum{n} -

-These macros are like \aaalph and \AAAlph -but take an actual number rather than a counter as the -argument. For example: \aaalphnum{125} will -produce: uuuuu, and \AAAlphnum{125} will -produce: UUUUU. - -

- -

-\abalph{counter} -

-This will print the value of counter as: a b ... z aa ab -... az etc. For example, \abalpha{mycounter} will -produce: du if mycounter is set to 125. - -

- -

-\ABAlph{counter} -

-This does the same thing, but uses uppercase characters, e.g. \ABAlph{mycounter} will produce: DU. - -

- -

-\abalphnum{n} -

- -

-\ABAlphnum{n} -

-These macros are like \abalph and \ABAlph -but take an actual number rather than a counter as the -argument. For example: \abalphnum{125} will -produce: du, and \ABAlphnum{125} will -produce: DU. - -

- -

-Package Options -

- -

-The following options can be passed to this package: - -

- - - - - - - -
raisemake ordinal st,nd,rd,th appear as superscript
levelmake ordinal st,nd,rd,th appear level with rest of -text
- -

-These can also be set using the command: - -

- -

-\fmtcountsetoptions{fmtord=type} -

-where type is either level or -raise. - -

- -

-Multilingual Support -

- -

-Version 1.02 of the fmtcount package now has -limited multilingual support. The following languages are -implemented: English, Spanish, Portuguese, French, French (Swiss) -and French (Belgian). German support was added in version -1.1.2Italian support was added in version 1.31.3 -

-The package checks to see if the command \l@language is -defined4, -and will load the code for those languages. The commands -\ordinal, \ordinalstring and \numberstring (and their -variants) will then be formatted in the currently selected language. - -

-If the French language is selected, the French (France) version -will be used by default (e.g. soxiante-dix for 70). To -select the Swiss or Belgian variants (e.g. septente for 70) use: -\fmtcountsetoptions{french=dialect} -where dialect is either swiss or belgian. -You can also use this command to change the action of -\ordinal. -\fmtcountsetoptions{abbrv=true} to produce ordinals -of the form 2e or -\fmtcountsetoptions{abbrv=false} to produce ordinals -of the form 2eme (default). - -

-The french and abbrv settings only have an -effect if the French language has been defined. - -

-The male gender for all languages is used by default, however the -feminine or neuter forms can be obtained by passing f or -n as an optional argument to \ordinal, -\ordinalnum etc. For example: -\numberstring{section}[f]. Note that the optional argument -comes after the compulsory argument. If a gender is -not defined in a given language, the masculine version will -be used instead. - -

-Let me know if you find any spelling mistakes (has been known -to happen in English, let alone other languages with which I'm not so -familiar.) If you want to add support for another language, -you will need to let me know how to form the numbers and ordinals -from 0 to 99999 in that language for each gender. - -

- -

-Configuration File fmtcount.cfg -

- -

-You can save your preferred default settings to a file called -fmtcount.cfg, and place it on the TeX path. These -settings will then be loaded by the fmtcount -package. - -

-Note that if you are using the datetime package, -the datetime.cfg configuration file will override -the fmtcount.cfg configuration file. -For example, if datetime.cfg has the line: -

-\renewcommand{\fmtord}[1]{\textsuperscript{\underline{#1}}}
-
-and if fmtcount.cfg has the line: -
-\fmtcountsetoptions{fmtord=level}
-
-then the former definition of \fmtord will take -precedence. - -

- -

-LaTeX2HTML style -

- -

-The LaTeX2HTML style file fmtcount.perl is provided. -The following limitations apply: - -

- -

- -

- -

-Acknowledgements -

- -

-I would like to thank my mother for the French and Portuguese -support and my Spanish dictionary for the Spanish support. -Thank you to K. H. Fricke for providing me with the German -translations and to Edoardo Pasca for providing me with the -Italian translations. - -

- -

-Troubleshooting -

- -

-There is a FAQ available at: -http://theoval.cmp.uea.ac.uk/~nlct/latex/packages/faq/. - -

-


Footnotes

-
-
... -argument1
-
See all the various postings to -comp.text.tex about \MakeUppercase - -
-
... -1.1.2
-
Thanks to K. H. Fricke for supplying the information. - -
-
... 1.31.3
-
Thanks to -Edoardo Pasca for supplying the information. - -
-
... -defined4
-
this will be true if you have loaded babel - -
-
-

-
-Nicola L. C. Talbot. -School of Computing Sciences. -University of East Anglia. -Last Modified: 2009-10-02 -
- - diff --git a/Master/texmf-dist/doc/latex/fmtcount/fmtcount.pdf b/Master/texmf-dist/doc/latex/fmtcount/fmtcount.pdf index 8448794662c..1d5a705eacc 100644 Binary files a/Master/texmf-dist/doc/latex/fmtcount/fmtcount.pdf and b/Master/texmf-dist/doc/latex/fmtcount/fmtcount.pdf differ -- cgit v1.2.3