summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/ordinalpt/README57
-rw-r--r--Master/texmf-dist/doc/latex/ordinalpt/ordinalpt.pdfbin0 -> 96143 bytes
-rw-r--r--Master/texmf-dist/source/latex/ordinalpt/ordinalpt.dtx372
-rw-r--r--Master/texmf-dist/source/latex/ordinalpt/ordinalpt.ins26
-rw-r--r--Master/texmf-dist/tex/latex/ordinalpt/ordinalpt.sty154
-rw-r--r--Master/texmf-dist/tpm/ordinalpt.tpm30
6 files changed, 639 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/ordinalpt/README b/Master/texmf-dist/doc/latex/ordinalpt/README
new file mode 100644
index 00000000000..b304851e278
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/ordinalpt/README
@@ -0,0 +1,57 @@
+ordinalpt.sty --- counters as ordinal numbers in Portuguese
+===========================================================
+
+Copyright (C) 2007 Miguel V. S. Frasson (mvsfrasson@gmail.com)
+
+LICENSE
+=======
+
+This file is the README file, part of the `ordinalpt' package.
+
+This package may be distributed under the terms of the LaTeX
+Project Public License, as described in lppl.txt in the base
+LaTeX distribution, either version 1.3 or (at your option)
+any later version.
+
+You can obtain a copy of the lppl.txt file from the internet on
+http://www.latex-project.org/lppl.txt
+
+INTRODUCTION
+============
+
+The package \textsf{ordinalpt} provides a counter style (like
++\arabic+, +\alph+ and others) but that produces as output strings
+like ``primeiro'' (first in Portuguese), ``segundo'' (second),
+``terceiro'' (third), \ldots, up to ``mil\'esimo noningent\'esimo
+nonag\'esimo nono'' (1999$^{\text{th}}$). There are counter commands
+to output the text in UPPERCASE, Capitalized or in lowercase, with
+masculine or feminine gender.
+
+USER COMMANDS
+=============
+
+\ordptmasc{counter} --> ordinals in lowercase masculine
+\Ordptmasc{counter} --> ordinals in capitalized masculine
+\ORDPTMASC{counter} --> ordinals in uppercase masculine
+\ordptfem{counter} --> ordinals in lowercase feminine
+\Ordptfem{counter} --> ordinals in capitalized feminine
+\ORDPTFEM{counter} --> ordinals in uppercase feminine
+
+PACKAGE OPTIONS
+===============
+
+In Portuguese, both
+ tricent\'esimo and trecent\'esimo (for 300th)
+ sexcent\'esimo and seiscent\'esimo (for 600th)
+ noningent\'esimo and nongent\'esimo (for 900th)
+are correct forms for ordinals.
+
+So there are the options
+ tricentesimo (default)
+ trecentesimo
+ sexcentesimo (default)
+ seiscentesimo
+ noningentesimo (default)
+ nongentesimo
+that switch to the respective forms when counters have values 300, 600
+or 900, respectively.
diff --git a/Master/texmf-dist/doc/latex/ordinalpt/ordinalpt.pdf b/Master/texmf-dist/doc/latex/ordinalpt/ordinalpt.pdf
new file mode 100644
index 00000000000..6edb6b175c9
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/ordinalpt/ordinalpt.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/ordinalpt/ordinalpt.dtx b/Master/texmf-dist/source/latex/ordinalpt/ordinalpt.dtx
new file mode 100644
index 00000000000..e00c9b6c862
--- /dev/null
+++ b/Master/texmf-dist/source/latex/ordinalpt/ordinalpt.dtx
@@ -0,0 +1,372 @@
+%% \CheckSum{260}
+% \iffalse
+% File: ordinalpt.dtx
+% Copyright (C) 2007 Miguel V. S. Frasson (mvsfrasson@gmail.com)
+%
+% This package may be distributed under the terms of the LaTeX
+% Project Public License, as described in lppl.txt in the base
+% LaTeX distribution, either version 1.2 or (at your option)
+% any later version.
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{doc}
+\usepackage{amstext,makeidx}
+\makeindex
+\begin{document}
+ \DocInput{ordinalpt.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \StopEventually
+%
+% \changes{1.0}{2007/01/10}{initial version}
+%
+% \MakeShortVerb+
+%
+% \title{\textsf{ordinalpt}: counters as ordinal numbers in Portuguese}
+% \author{Miguel Vin\'\i cius Santini Frasson}
+% \date{2007--01--10 version 1.0}
+%
+% \maketitle
+%
+% \section{Introduction}
+%
+% The package \textsf{ordinalpt} provides a counter style (like
+% +\arabic+, +\alph+ and others) but that produces as
+% output strings like ``primeiro'' (first in Portuguese),
+% ``segundo'' (second), ``terceiro'' (third), \ldots, up to
+% ``mil\'esimo nongent\'esimo nonag\'esimo nono''
+% (1999$^{\text{th}}$). There are counter commands to output the
+% text in UPPERCASE, Capitalized or in lowercase, with masculine or
+% feminine gender.
+%
+% \section{User commands}
+%
+% \newcommand{\countername}{\texttt{\textit{counter}}}
+%
+% \DescribeMacro{\ordptmasc}
+% \DescribeMacro{\Ordptmasc}
+% \DescribeMacro{\ORDPTMASC}
+% \DescribeMacro{\ordptfem}
+% \DescribeMacro{\Ordptfem}
+% \DescribeMacro{\ORDPTFEM}
+% Six commands to output all incarnations of ordinal numbers in
+% portuguese --- masculine or feminine, in ``lowercase'',
+% ``Capitalized'' or in ``UPPERCASE''---:\\
+% + \ordptmasc{+\countername+}+ (lowercase masculine),\\
+% + \Ordptmasc{+\countername+}+ (capitalized masculine),\\
+% + \ORDPTMASC{+\countername+}+ (uppercase masculine),\\
+% + \ordptfem{+\countername+}+ (lowercase feminine),\\
+% + \Ordptfem{+\countername+}+ (capitalized feminine) and\\
+% + \ORDPTFEM{+\countername+}+ (uppercase feminine).
+%
+% Example:
+%
+%\begin{verbatim}
+%\renewcommand{\thepage}{--- \Ordptfem{page} p\'agina ---}
+%\end{verbatim}
+% will produce in the place for page numbers:
+%
+%\centerline{--- Primeira p\'agina ---}
+%\centerline{--- Segunda p\'agina ---}
+%
+% \section{User options}
+%
+% \DescribeEnv{tricentesimo}
+% \DescribeEnv{trecentesimo}
+% The options `\texttt{tricentesimo}' (default; closer to latin
+% \textit{tricentesimu}) and `\texttt{trecentesimo}' are provided
+% to use between ``tricent\'esimo'' and ``trecent\'esimo'', since
+% both forms are correct for the ordinal of 300.
+%
+% \DescribeEnv{sexcentesimo}
+% \DescribeEnv{seiscentesimo}
+% The options `\texttt{sexcentesimo}' (default; closer to the latin
+% \textit{sexcentesimu}) and `\texttt{seiscentesimo}' are provided
+% to choose between ``sexcent\'esimo'' and ``seiscent\'esimo'',
+% since both forms are correct for the ordinal of 600.
+%
+% \DescribeEnv{noningentesimo}
+% \DescribeEnv{nongentesimo}
+% The options `\texttt{noningentesimo}' (default; from latin
+% \textit{noningentesimu}) and `\texttt{nongentesimo} (from latin
+% \textit{nongentesimu})' are provided to choose between
+% ``noningent\'esimo'' and ``nongent\'esimo'', since both forms are
+% correct for the ordinal of 900.
+%
+% \section{Code}
+%
+% Identidication of the package and use of the package \textsf{ifthen}.
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{ordinalpt}[2007/01/11 v1.0 Ordinal numbers in Portuguese]
+\RequirePackage{ifthen}
+% \end{macrocode}
+%
+% \DescribeEnv{tricentesimo}
+% \DescribeEnv{trecentesimo}
+% Declaring options `\texttt{tricentesimo}' (default) and
+% `\texttt{trecentesimo}', since both forms ``tricent\'esimo'' and
+% ``trecent\'esimo'' are correct for the ordinal of 300.
+% \begin{macrocode}
+\DeclareOption{tricentesimo}{\def\@ordpt@tricent{i}}
+\DeclareOption{trecentesimo}{\def\@ordpt@tricent{e}}
+\ExecuteOptions{tricentesimo}
+% \end{macrocode}
+%
+% \DescribeEnv{sexcentesimo}
+% \DescribeEnv{seiscentesimo}
+% Declaring options `\texttt{sexcentesimo}' (default; closer to the
+% latin \textit{sexcentesimu}) and
+% `\texttt{seiscentesimo}', since both forms ``sexcent\'esimo'' and
+% ``seiscent\'esimo'' are correct for the ordinal of 600.
+% \begin{macrocode}
+\DeclareOption{sexcentesimo}{\def\@ordpt@sexcent{x}}
+\DeclareOption{seiscentesimo}{\def\@ordpt@sexcent{is}}
+\ExecuteOptions{sexcentesimo}
+% \end{macrocode}
+%
+% \DescribeEnv{noningentesimo}
+% \DescribeEnv{nongentesimo}
+% Declaring options `\texttt{noningentesimo}' (default; from latin
+% \textit{noningentesimu}) and `\texttt{nongentesimo} (from latin
+% \textit{nongentesimu})', since both forms ``noningent\'esimo'' and
+% ``nongent\'esimo'' are correct for the ordinal of 900.
+% \begin{macrocode}
+\DeclareOption{noningentesimo}{\def\@ordpt@noningent{in}}
+\DeclareOption{nongentesimo}{\def\@ordpt@noningent{}}
+\ExecuteOptions{noningentesimo}
+% \end{macrocode}
+%
+% Processing options.
+% \begin{macrocode}
+\ProcessOptions
+% \end{macrocode}
+%
+% \DescribeEnv{@ordpt@putspace}
+% \DescribeEnv{@ordpt@counter}
+% \DescribeEnv{@ordpt@alg}
+% \DescribeMacro{\@ordpt@case}
+% \DescribeMacro{\@ordpt@masc}
+% \DescribeMacro{\@ordpt@fem}
+% \DescribeMacro{\@ordpt@ul}
+% Declaring internals.
+% \begin{macrocode}
+\newboolean{@ordpt@putspace}
+\newcounter{@ordpt@counter}
+\newcounter{@ordpt@alg}
+\newcommand{\@ordpt@case}{}
+\newcommand{\@ordpt@masc}{o}
+\newcommand{\@ordpt@fem}{a}
+\newcommand{\@ordpt@ul}{o}
+% \end{macrocode}
+%
+% \DescribeMacro{\@ordpt@capitalize}
+% \begin{macrocode}
+\newcommand{\@ordpt@capitalize}[1]{\MakeUppercase#1}
+% \end{macrocode}
+%
+% \DescribeMacro{\@ordpt@ordunits}
+% \DescribeMacro{\@ordpt@ordtens}
+% \DescribeMacro{\@ordpt@ordcents}
+% These commands take a number between 0 and 9 and return ordinal in
+% Portuguese from ``first'' to ``nineth'', ``tenth'' to
+% ``ninetieth'' (by 10) and ``one hundredieth'' to ``nine
+% hundredieth'' (by 100). Inside the user commands the command
+% +\@ordpt@case+ will be redefined to be identity (lowercase),
+% +\@ordpt@capitalize+ (capitalized) or +\MakeUppercase+ (uppercase) and
+% +\@ordpt@ul+ will be defined as ``o'' (masculine) or ``a''
+% (feminine).
+% \begin{macrocode}
+\newcommand{\@ordpt@ordunits}[1]{%
+ \ifcase#1\or
+ \@ordpt@case{primeir\@ordpt@ul}\or
+ \@ordpt@case{segund\@ordpt@ul}\or
+ \@ordpt@case{terceir\@ordpt@ul}\or
+ \@ordpt@case{quart\@ordpt@ul}\or
+ \@ordpt@case{quint\@ordpt@ul}\or
+ \@ordpt@case{sext\@ordpt@ul}\or
+ \@ordpt@case{s\'etim\@ordpt@ul}\or
+ \@ordpt@case{oitav\@ordpt@ul}\or
+ \@ordpt@case{non\@ordpt@ul}%
+ \fi}
+\newcommand{\@ordpt@ordtens}[1]{%
+ \ifcase#1\or
+ \@ordpt@case{d\'ecim\@ordpt@ul}\or
+ \@ordpt@case{vig\'esim\@ordpt@ul}\or
+ \@ordpt@case{trig\'esim\@ordpt@ul}\or
+ \@ordpt@case{quadrag\'esim\@ordpt@ul}\or
+ \@ordpt@case{quinquag\'esim\@ordpt@ul}\or
+ \@ordpt@case{sexag\'esim\@ordpt@ul}\or
+ \@ordpt@case{septuag\'esim\@ordpt@ul}\or
+ \@ordpt@case{octog\'esim\@ordpt@ul}\or
+ \@ordpt@case{nonag\'esim\@ordpt@ul}%
+ \fi}
+\newcommand{\@ordpt@ordcents}[1]{%
+ \ifcase#1\or
+ \@ordpt@case{cent\'esim\@ordpt@ul}\or
+ \@ordpt@case{ducent\'esim\@ordpt@ul}\or
+ \@ordpt@case{tr\@ordpt@tricent cent\'esim\@ordpt@ul}\or
+ \@ordpt@case{quadringent\'esim\@ordpt@ul}\or
+ \@ordpt@case{quingent\'esim\@ordpt@ul}\or
+ \@ordpt@case{se\@ordpt@sexcent cent\'esim\@ordpt@ul}\or
+ \@ordpt@case{septingent\'esim\@ordpt@ul}\or
+ \@ordpt@case{octingent\'esim\@ordpt@ul}\or
+ \@ordpt@case{non\@ordpt@noningent gent\'esim\@ordpt@ul}%
+ \fi}
+% \end{macrocode}
+%
+% \DescribeMacro{\@ordpt@ordinal}
+% This command does all the work of mount the words.
+% \begin{macrocode}
+\newcommand{\@ordpt@ordinal}[1]{%
+% \end{macrocode}
+% It checks whether the number is between 0 and 1999.
+% \begin{macrocode}
+ \ifthenelse{\value{#1}>0\and\value{#1}<2000}
+% \end{macrocode}
+% Save original counter to the counter \texttt{@ordpt@counter}.
+% \begin{macrocode}
+ {%
+ \setcounter{@ordpt@counter}{\value{#1}}%
+% \end{macrocode}
+% Then, if it is larger than 999, adds ``milesimo(a)'' in front of it.
+% \begin{macrocode}
+ \ifthenelse{\value{@ordpt@counter}>999}
+ {%
+ \@ordpt@case{mil\'esim\@ordpt@ul}%
+% \end{macrocode}
+% Save in the boolean \texttt{@ordpt@putspace} to put a space if
+% something else is to be written.
+% \begin{macrocode}
+ \setboolean{@ordpt@putspace}{true}%
+% \end{macrocode}
+% Subtract 1000 from the counter
+% \begin{macrocode}
+ \addtocounter{@ordpt@counter}{-1000}%
+ }
+% \end{macrocode}
+% If counter is less than 1000, set the boolean
+% \texttt{@ordpt@putspace} to not put a space if
+% something else is to be written.
+% \begin{macrocode}
+ {%
+ \setboolean{@ordpt@putspace}{false}%
+ }%
+% \end{macrocode}
+% Starts to parse the counter. Gets the algarism of cents, reseting
+% counter \texttt{@ordpt@alg} and does a loop, steping
+% \texttt{@ordpt@alg} and subtracting 100 from
+% \texttt{@ordpt@counter} while this counter is larger than 100.
+% \begin{macrocode}
+ \setcounter{@ordpt@alg}{0}%
+ \whiledo{\value{@ordpt@counter}>99}
+ {%
+ \stepcounter{@ordpt@alg}%
+ \addtocounter{@ordpt@counter}{-100}%
+ }%
+% \end{macrocode}
+% If the algarism of the cents is positive, checks if it has to add a
+% space, writes with +\@ordpt@ordcents+ and set boolean
+% \texttt{@ordpt@putspace} accordingly.
+% \begin{macrocode}
+ \ifthenelse{\value{@ordpt@alg}>0}
+ {%
+ \ifthenelse{\boolean{@ordpt@putspace}}{\space}{}%
+ \@ordpt@ordcents{\value{@ordpt@alg}}%
+ \setboolean{@ordpt@putspace}{true}%
+ }
+ {}%
+% \end{macrocode}
+% Gets the digits of tens analogously it did before.
+% \begin{macrocode}
+ \setcounter{@ordpt@alg}{0}%
+ \whiledo{\value{@ordpt@counter}>9}
+ {%
+ \stepcounter{@ordpt@alg}%
+ \addtocounter{@ordpt@counter}{-10}%
+ }%
+ \ifthenelse{\value{@ordpt@alg}>0}
+ {%
+ \ifthenelse{\boolean{@ordpt@putspace}}{\space}{}%
+ \@ordpt@ordtens{\value{@ordpt@alg}}%
+ \setboolean{@ordpt@putspace}{true}%
+ }
+ {}%
+% \end{macrocode}
+% Now counter \texttt{@ordpt@counter} is left with the units digit.
+% Print as before.
+% \begin{macrocode}
+ \ifthenelse{\value{@ordpt@counter}>0}
+ {%
+ \ifthenelse{\boolean{@ordpt@putspace}}{\space}{}%
+ \@ordpt@ordunits{\value{@ordpt@counter}}%
+ }
+ {}%
+ }
+% end of the first +\ifthenelse+: sign counter error if argument
+% counter is not between 1 and 1999 inclusively.
+% \begin{macrocode}
+ {\@ctrerr}%
+}
+% \end{macrocode}
+%
+% \DescribeMacro{\ordptmasc}
+% \DescribeMacro{\Ordptmasc}
+% \DescribeMacro{\ORDPTMASC}
+% \DescribeMacro{\ordptfem}
+% \DescribeMacro{\Ordptfem}
+% \DescribeMacro{\ORDPTFEM}
+% The end user commands. The diference between them is the +\let+
+% binds of +\@ordpt@case+ to +\@fisrtofone+, +\@ordpt@capitalize+ or
+% +\MakeUppercase+, and binds of +\@ordpt@ul+ to +\@ordpt@masc+=``o'' or
+% +\@ordpt@fem+=``a''.
+% \begin{macrocode}
+\newcommand{\ordptmasc}[1]{%
+ \let\@ordpt@case\@firstofone
+ \let\@ordpt@ul\@ordpt@masc
+ \@ordpt@ordinal{#1}}
+\newcommand{\Ordptmasc}[1]{%
+ \let\@ordpt@case\@ordpt@capitalize
+ \let\@ordpt@ul\@ordpt@masc
+ \@ordpt@ordinal{#1}}
+\newcommand{\ORDPTMASC}[1]{%
+ \let\@ordpt@case\MakeUppercase
+ \let\@ordpt@ul\@ordpt@masc
+ \@ordpt@ordinal{#1}}
+\newcommand{\ordptfem}[1]{%
+ \let\@ordpt@case\@firstofone
+ \let\@ordpt@ul\@ordpt@fem
+ \@ordpt@ordinal{#1}}
+\newcommand{\Ordptfem}[1]{%
+ \let\@ordpt@case\@ordpt@capitalize
+ \let\@ordpt@ul\@ordpt@fem
+ \@ordpt@ordinal{#1}}
+\newcommand{\ORDPTFEM}[1]{%
+ \let\@ordpt@case\MakeUppercase
+ \let\@ordpt@ul\@ordpt@fem
+ \@ordpt@ordinal{#1}}
+% \end{macrocode}
+% \Finale \PrintIndex %\PrintChanges
+%
+\endinput
+%
+%% \CharacterTable
+%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%% Digits \0\1\2\3\4\5\6\7\8\9
+%% Exclamation \! Double quote \" Hash (number) \#
+%% Dollar \$ Percent \% Ampersand \&
+%% Acute accent \' Left paren \( Right paren \)
+%% Asterisk \* Plus \+ Comma \,
+%% Minus \- Point \. Solidus \/
+%% Colon \: Semicolon \; Less than \<
+%% Equals \= Greater than \> Question mark \?
+%% Commercial at \@ Left bracket \[ Backslash \\
+%% Right bracket \] Circumflex \^ Underscore \_
+%% Grave accent \` Left brace \{ Vertical bar \|
+%% Right brace \} Tilde \~}
diff --git a/Master/texmf-dist/source/latex/ordinalpt/ordinalpt.ins b/Master/texmf-dist/source/latex/ordinalpt/ordinalpt.ins
new file mode 100644
index 00000000000..8061d43c99d
--- /dev/null
+++ b/Master/texmf-dist/source/latex/ordinalpt/ordinalpt.ins
@@ -0,0 +1,26 @@
+\input docstrip
+
+\preamble
+
+Copyright (C) 2007 Miguel V. S. Frasson (mvsfrasson@gmail.com)
+
+This file is part of the `ordinalpt' package.
+
+This package may be distributed under the terms of the LaTeX
+Project Public License, as described in lppl.txt in the base
+LaTeX distribution, either version 1.2 or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+\endpreamble
+
+\askforoverwritefalse
+\askonceonly
+\showprogress
+
+\generate{\file{ordinalpt.sty}{\from{ordinalpt.dtx}{}}}
+
+\endbatchfile \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/ordinalpt/ordinalpt.sty b/Master/texmf-dist/tex/latex/ordinalpt/ordinalpt.sty
new file mode 100644
index 00000000000..84f52970370
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ordinalpt/ordinalpt.sty
@@ -0,0 +1,154 @@
+%%
+%% This is file `ordinalpt.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% ordinalpt.dtx
+%%
+%% Copyright (C) 2007 Miguel V. S. Frasson (mvsfrasson@gmail.com)
+%%
+%% This file is part of the `ordinalpt' package.
+%%
+%% This package may be distributed under the terms of the LaTeX
+%% Project Public License, as described in lppl.txt in the base
+%% LaTeX distribution, either version 1.2 or (at your option)
+%% any later version.
+%%
+%% This program is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+%%
+%% \CheckSum{260}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{ordinalpt}[2007/01/11 v1.0 Ordinal numbers in Portuguese]
+\RequirePackage{ifthen}
+\DeclareOption{tricentesimo}{\def\@ordpt@tricent{i}}
+\DeclareOption{trecentesimo}{\def\@ordpt@tricent{e}}
+\ExecuteOptions{tricentesimo}
+\DeclareOption{sexcentesimo}{\def\@ordpt@sexcent{x}}
+\DeclareOption{seiscentesimo}{\def\@ordpt@sexcent{is}}
+\ExecuteOptions{sexcentesimo}
+\DeclareOption{noningentesimo}{\def\@ordpt@noningent{in}}
+\DeclareOption{nongentesimo}{\def\@ordpt@noningent{}}
+\ExecuteOptions{noningentesimo}
+\ProcessOptions
+\newboolean{@ordpt@putspace}
+\newcounter{@ordpt@counter}
+\newcounter{@ordpt@alg}
+\newcommand{\@ordpt@case}{}
+\newcommand{\@ordpt@masc}{o}
+\newcommand{\@ordpt@fem}{a}
+\newcommand{\@ordpt@ul}{o}
+\newcommand{\@ordpt@capitalize}[1]{\MakeUppercase#1}
+\newcommand{\@ordpt@ordunits}[1]{%
+ \ifcase#1\or
+ \@ordpt@case{primeir\@ordpt@ul}\or
+ \@ordpt@case{segund\@ordpt@ul}\or
+ \@ordpt@case{terceir\@ordpt@ul}\or
+ \@ordpt@case{quart\@ordpt@ul}\or
+ \@ordpt@case{quint\@ordpt@ul}\or
+ \@ordpt@case{sext\@ordpt@ul}\or
+ \@ordpt@case{s\'etim\@ordpt@ul}\or
+ \@ordpt@case{oitav\@ordpt@ul}\or
+ \@ordpt@case{non\@ordpt@ul}%
+ \fi}
+\newcommand{\@ordpt@ordtens}[1]{%
+ \ifcase#1\or
+ \@ordpt@case{d\'ecim\@ordpt@ul}\or
+ \@ordpt@case{vig\'esim\@ordpt@ul}\or
+ \@ordpt@case{trig\'esim\@ordpt@ul}\or
+ \@ordpt@case{quadrag\'esim\@ordpt@ul}\or
+ \@ordpt@case{quinquag\'esim\@ordpt@ul}\or
+ \@ordpt@case{sexag\'esim\@ordpt@ul}\or
+ \@ordpt@case{septuag\'esim\@ordpt@ul}\or
+ \@ordpt@case{octog\'esim\@ordpt@ul}\or
+ \@ordpt@case{nonag\'esim\@ordpt@ul}%
+ \fi}
+\newcommand{\@ordpt@ordcents}[1]{%
+ \ifcase#1\or
+ \@ordpt@case{cent\'esim\@ordpt@ul}\or
+ \@ordpt@case{ducent\'esim\@ordpt@ul}\or
+ \@ordpt@case{tr\@ordpt@tricent cent\'esim\@ordpt@ul}\or
+ \@ordpt@case{quadringent\'esim\@ordpt@ul}\or
+ \@ordpt@case{quingent\'esim\@ordpt@ul}\or
+ \@ordpt@case{se\@ordpt@sexcent cent\'esim\@ordpt@ul}\or
+ \@ordpt@case{septingent\'esim\@ordpt@ul}\or
+ \@ordpt@case{octingent\'esim\@ordpt@ul}\or
+ \@ordpt@case{non\@ordpt@noningent gent\'esim\@ordpt@ul}%
+ \fi}
+\newcommand{\@ordpt@ordinal}[1]{%
+ \ifthenelse{\value{#1}>0\and\value{#1}<2000}
+ {%
+ \setcounter{@ordpt@counter}{\value{#1}}%
+ \ifthenelse{\value{@ordpt@counter}>999}
+ {%
+ \@ordpt@case{mil\'esim\@ordpt@ul}%
+ \setboolean{@ordpt@putspace}{true}%
+ \addtocounter{@ordpt@counter}{-1000}%
+ }
+ {%
+ \setboolean{@ordpt@putspace}{false}%
+ }%
+ \setcounter{@ordpt@alg}{0}%
+ \whiledo{\value{@ordpt@counter}>99}
+ {%
+ \stepcounter{@ordpt@alg}%
+ \addtocounter{@ordpt@counter}{-100}%
+ }%
+ \ifthenelse{\value{@ordpt@alg}>0}
+ {%
+ \ifthenelse{\boolean{@ordpt@putspace}}{\space}{}%
+ \@ordpt@ordcents{\value{@ordpt@alg}}%
+ \setboolean{@ordpt@putspace}{true}%
+ }
+ {}%
+ \setcounter{@ordpt@alg}{0}%
+ \whiledo{\value{@ordpt@counter}>9}
+ {%
+ \stepcounter{@ordpt@alg}%
+ \addtocounter{@ordpt@counter}{-10}%
+ }%
+ \ifthenelse{\value{@ordpt@alg}>0}
+ {%
+ \ifthenelse{\boolean{@ordpt@putspace}}{\space}{}%
+ \@ordpt@ordtens{\value{@ordpt@alg}}%
+ \setboolean{@ordpt@putspace}{true}%
+ }
+ {}%
+ \ifthenelse{\value{@ordpt@counter}>0}
+ {%
+ \ifthenelse{\boolean{@ordpt@putspace}}{\space}{}%
+ \@ordpt@ordunits{\value{@ordpt@counter}}%
+ }
+ {}%
+ }
+ {\@ctrerr}%
+}
+\newcommand{\ordptmasc}[1]{%
+ \let\@ordpt@case\@firstofone
+ \let\@ordpt@ul\@ordpt@masc
+ \@ordpt@ordinal{#1}}
+\newcommand{\Ordptmasc}[1]{%
+ \let\@ordpt@case\@ordpt@capitalize
+ \let\@ordpt@ul\@ordpt@masc
+ \@ordpt@ordinal{#1}}
+\newcommand{\ORDPTMASC}[1]{%
+ \let\@ordpt@case\MakeUppercase
+ \let\@ordpt@ul\@ordpt@masc
+ \@ordpt@ordinal{#1}}
+\newcommand{\ordptfem}[1]{%
+ \let\@ordpt@case\@firstofone
+ \let\@ordpt@ul\@ordpt@fem
+ \@ordpt@ordinal{#1}}
+\newcommand{\Ordptfem}[1]{%
+ \let\@ordpt@case\@ordpt@capitalize
+ \let\@ordpt@ul\@ordpt@fem
+ \@ordpt@ordinal{#1}}
+\newcommand{\ORDPTFEM}[1]{%
+ \let\@ordpt@case\MakeUppercase
+ \let\@ordpt@ul\@ordpt@fem
+ \@ordpt@ordinal{#1}}
+\endinput
+%%
+%% End of file `ordinalpt.sty'.
diff --git a/Master/texmf-dist/tpm/ordinalpt.tpm b/Master/texmf-dist/tpm/ordinalpt.tpm
new file mode 100644
index 00000000000..d35bf9f7c2b
--- /dev/null
+++ b/Master/texmf-dist/tpm/ordinalpt.tpm
@@ -0,0 +1,30 @@
+<!DOCTYPE rdf:RDF SYSTEM "../../support/tpm.dtd">
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:TPM="http://texlive.dante.de/">
+ <rdf:Description about="http://texlive.dante.de/texlive/Package/ordinalpt.zip">
+ <TPM:Name>ordinalpt</TPM:Name>
+ <TPM:Type>Package</TPM:Type>
+ <TPM:Date>2007/01/12 00:05:00</TPM:Date>
+ <TPM:Version></TPM:Version>
+ <TPM:Creator>karl</TPM:Creator>
+ <TPM:Title>The ordinalpt package.</TPM:Title>
+ <TPM:Description></TPM:Description>
+ <TPM:Author></TPM:Author>
+ <TPM:Size>116262</TPM:Size>
+ <TPM:License></TPM:License>
+ <TPM:Build/>
+ <TPM:RunFiles size="5897">
+texmf-dist/tex/latex/ordinalpt/ordinalpt.sty
+texmf-dist/tpm/ordinalpt.tpm
+ </TPM:RunFiles>
+ <TPM:DocFiles size="98009">
+texmf-dist/doc/latex/ordinalpt/README
+texmf-dist/doc/latex/ordinalpt/ordinalpt.pdf
+ </TPM:DocFiles>
+ <TPM:SourceFiles size="13433">
+texmf-dist/source/latex/ordinalpt/ordinalpt.dtx
+texmf-dist/source/latex/ordinalpt/ordinalpt.ins
+ </TPM:SourceFiles>
+ <TPM:Provides>Package/ordinalpt</TPM:Provides>
+ </rdf:Description>
+</rdf:RDF>
+