diff options
author | Karl Berry <karl@freefriends.org> | 2021-11-23 22:40:37 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-11-23 22:40:37 +0000 |
commit | 5371b53200e6d7557e9333e99c9ea68605fd887a (patch) | |
tree | b5b335bd915f9d878323275bf1936ed81d4c2eef | |
parent | bbf5f223d533f4cefd05ab5e39791ffe6c1ddb73 (diff) |
numspell (23nov21)
git-svn-id: svn://tug.org/texlive/trunk@61132 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/numspell/README | 7 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/numspell/numspell.pdf | bin | 223145 -> 270892 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/numspell/numspell.tex | 67 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/numspell/numspell-english.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/numspell/numspell-french.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/numspell/numspell-german.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/numspell/numspell-italian.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/numspell/numspell-latin.sty | 878 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/numspell/numspell-magyar.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/numspell/numspell.sty | 14 |
10 files changed, 946 insertions, 30 deletions
diff --git a/Master/texmf-dist/doc/latex/numspell/README b/Master/texmf-dist/doc/latex/numspell/README index 8a3bd49fecd..32cd6dca3b6 100644 --- a/Master/texmf-dist/doc/latex/numspell/README +++ b/Master/texmf-dist/doc/latex/numspell/README @@ -1,9 +1,9 @@ numspell.sty package -Copyright 2017-2020 by Tibor Tomacs +Copyright 2017-2021 by Tibor Tómács This package supports the spelling of cardinal and ordinal numbers. -Supported languages are English, French, German, Hungarian and Italian. +Supported languages are English, French, German, Hungarian, Italian, and Latin. This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 @@ -24,6 +24,7 @@ numspell.sty (main package file) numspell-english.sty (English package for numspell) numspell-french.sty (French package for numspell) numspell-german.sty (German package for numspell) -numspell-magyar.sty (Hungarian package for numspell) numspell-italian.sty (Italian package for numspell) +numspell-latin.sty (Latin package for numspell) +numspell-magyar.sty (Hungarian package for numspell) numspell.tex and the derived file numspell.pdf (documentation).
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/numspell/numspell.pdf b/Master/texmf-dist/doc/latex/numspell/numspell.pdf Binary files differindex b3878a16506..477d82aa5e8 100644 --- a/Master/texmf-dist/doc/latex/numspell/numspell.pdf +++ b/Master/texmf-dist/doc/latex/numspell/numspell.pdf diff --git a/Master/texmf-dist/doc/latex/numspell/numspell.tex b/Master/texmf-dist/doc/latex/numspell/numspell.tex index 99128819f99..534873118b4 100644 --- a/Master/texmf-dist/doc/latex/numspell/numspell.tex +++ b/Master/texmf-dist/doc/latex/numspell/numspell.tex @@ -1,7 +1,7 @@ %% %% `numspell.tex' documentation of the numspell package %% -%% Copyright 2017-2020 by Tibor Tomacs +%% Copyright 2017-2021 by Tibor Tomacs %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -17,20 +17,19 @@ %% \documentclass{article} \usepackage[a4paper]{geometry} -\usepackage[pdfstartview=FitH,colorlinks,allcolors=black,bookmarksnumbered]{hyperref} +\usepackage[pdfstartview=FitH,colorlinks,allcolors=black,bookmarksnumbered,hyperfootnotes=false]{hyperref} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} -\usepackage{numspell} -\usepackage[magyar,italian,ngerman,french,english]{babel} -\usepackage{listings,xcolor,amsmath,upquote} -\usepackage[group-separator={,}]{siunitx} +\usepackage[magyar,italian,latin,ngerman,french,english]{babel} +\usepackage[symbol]{footmisc} +\usepackage{numspell,listings,xcolor,amsmath,upquote} \flushbottom \setlength{\labelsep}{0pt} \setlength{\parindent}{0pt} \setlength{\parskip}{6pt} \lstnewenvironment{examplelst}{\lstset{ -%belowskip=\bigskipamount, +aboveskip=\bigskipamount, basicstyle=\ttfamily, backgroundcolor=\color{black!10}, frame=trbl, @@ -56,15 +55,15 @@ keepspaces]} \begin{document} -\title{The {\bfseries\sffamily numspell} package\\{\large v1.4 (2020/11/11)}} +\title{The {\bfseries\sffamily numspell} package\\{\large v1.5 (2021/11/23)}} \author{Tibor Tómács\\{\normalsize\url{tomacs.tibor@uni-eszterhazy.hu}}} \date{} \maketitle \section{Introduction} -The aim of the \texttt{numspell} package is to spell the cardinal and ordinal numbers from 0 to $10^{67}-1$ (i.e.~maximum 66 digits). +The aim of the \texttt{numspell} package is to spell the cardinal and ordinal numbers from 0 to $10^{66}-1$ (i.e.~maximum 66 digits). -The supported languages are English (British and American), French, German, Hungarian and Italian. +The supported languages are English (British and American), French, German, Hungarian, Italian, and Latin\footnote{Thanks to Keno Wehr for the Latin language module.} (classical, medieval, modern, and ecclesiastic). The spelling will happen in the current language. The \texttt{numspell} package requires the services of the \texttt{xstring} and \texttt{iflang} packages. @@ -77,7 +76,7 @@ Load the package as usual, with \section{Commands} \begin{description} \item\commandinline|\numspell[!<zeros>!]{!<num>!}|\\ -Spelling the cardinal number $n=\text{\color{green!50!black}\itshape$\langle$num$\rangle$}\cdot10^{\text{\color{green!50!black}\itshape$\langle$zeros$\rangle$}}$, where $0\leq n\leq 10^{67}-1$. The default value of \commandinline|!<zeros>!| is \texttt{0}. For example +Spelling the cardinal number $n=\text{\color{green!50!black}\itshape$\langle$num$\rangle$}\cdot10^{\text{\color{green!50!black}\itshape$\langle$zeros$\rangle$}}$, where $0\leq n\leq 10^{66}-1$. The default value of \commandinline|!<zeros>!| is \texttt{0}. For example \begin{flushleft} \verb|\numspell{12000}| $\to$ \numspell{12000}\\ \verb|\numspell[3]{12}| $\to$ \numspell[3]{12}\\ @@ -175,7 +174,7 @@ For example \item\commandinline|\ordnumspell[!<zeros>!]{!<num>!}|\\ Spelling the ordinal number $n=\text{\color{green!50!black}\itshape$\langle$num$\rangle$}\cdot10^{\text{\color{green!50!black}\itshape$\langle$zeros$\rangle$}}$, -where $0\leq n\leq 10^{67}-1$. The default value of \commandinline|!<zeros>!| is \texttt{0}. For example +where $0\leq n\leq 10^{66}-1$. The default value of \commandinline|!<zeros>!| is \texttt{0}. For example \begin{flushleft} \verb|\ordnumspell{12000}| $\to$ \ordnumspell{12000}\\ \verb|\ordnumspell[3]{12}| $\to$ \ordnumspell[3]{12}\\ @@ -349,12 +348,36 @@ The ordinal numbers will be printed in feminine form. For example\\ {\numspellitfeminine\ordnumspell{1}}; {\numspellitmasculine\ordnumspell{1}} \end{description} +\section{Commands for the Latin language} +The following commands only work, if one of the next languages is active: \texttt{latin}, \texttt{classiclatin}, \texttt{medievallatin}, or \texttt{ecclesiasticlatin}. +\begin{description} +\selectlanguage{latin} +\item\commandinline|\numspelllamasculine| (default)\\ +All numbers will be printed in masculine form. For example\\ +\verb|\numspell{1}, \numspell{2}, \numspell{200}, \ordnumspell{1}|\\[2mm] +\numspell{1}, \numspell{2}, \numspell{200}, \ordnumspell{1} + +\item\commandinline|\numspelllafeminine|\\ +All numbers will be printed in feminine form. For example\\ +\verb|\numspelllafeminine|\\ +\verb|\numspell{1}, \numspell{2}, \numspell{200}, \ordnumspell{1}|\\[2mm] +\numspelllafeminine +\numspell{1}, \numspell{2}, \numspell{200}, \ordnumspell{1} + +\item\commandinline|\numspelllaneuter|\\ +All numbers will be printed in neuter form. For example\\ +\verb|\numspelllaneuter|\\ +\verb|\numspell{1}, \numspell{2}, \numspell{200}, \ordnumspell{1}|\\[2mm] +\numspelllaneuter +\numspell{1}, \numspell{2}, \numspell{200}, \ordnumspell{1} +\end{description} + \section{Examples} \begin{examplelst} \documentclass{article} \usepackage[T1]{fontenc} -\usepackage[magyar,italian,ngerman,french,english]{babel} +\usepackage[magyar,italian,latin,ngerman,french,english]{babel} \usepackage{numspell} \usepackage[group-separator={,}]{siunitx} \begin{document} @@ -377,27 +400,33 @@ In Hungarian the spelling of \num{\mynum} is \par\smallskip\noindent In Italian the spelling of \num{\mynum} is \foreignlanguage{italian}{\em\numspell{\mynum}}. +\par\smallskip\noindent +In Latin the spelling of \num{\mynum} is +\foreignlanguage{latin}{\em\numspell{\mynum}}. \end{document} \end{examplelst} \def\mynum{123456789} \noindent -In British English the spelling of \num{\mynum} is +In British English the spelling of 123,456,789 is \emph{\numspell{\mynum}}. \par\smallskip\noindent -In American English the spelling of \num{\mynum} is +In American English the spelling of 123,456,789 is \foreignlanguage{american}{\em\numspell{\mynum}}. \par\smallskip\noindent -In French the spelling of \num{\mynum} is +In French the spelling of 123,456,789 is \foreignlanguage{french}{\em\numspell{\mynum}}. \par\smallskip\noindent -In German the spelling of \num{\mynum} is +In German the spelling of 123,456,789 is \foreignlanguage{ngerman}{\em\numspell{\mynum}}. \par\smallskip\noindent -In Hungarian the spelling of \num{\mynum} is +In Hungarian the spelling of 123,456,789 is \foreignlanguage{magyar}{\em\numspell{\mynum}}. \par\smallskip\noindent -In Italian the spelling of \num{\mynum} is +In Italian the spelling of 123,456,789 is \foreignlanguage{italian}{\em\numspell{\mynum}}. +\par\smallskip\noindent +In Latin the spelling of 123,456,789 is +\foreignlanguage{latin}{\em\numspell{\mynum}}. \begin{examplelst} \documentclass{article} diff --git a/Master/texmf-dist/tex/latex/numspell/numspell-english.sty b/Master/texmf-dist/tex/latex/numspell/numspell-english.sty index 4ad8bf476d2..ba4c3be462e 100644 --- a/Master/texmf-dist/tex/latex/numspell/numspell-english.sty +++ b/Master/texmf-dist/tex/latex/numspell/numspell-english.sty @@ -1,7 +1,7 @@ %% %% `numspell-english.sty' English language package for 'numspell.sty' %% -%% Copyright 2017-2020 by Tibor Tomacs +%% Copyright 2017-2021 by Tibor Tomacs %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/numspell/numspell-french.sty b/Master/texmf-dist/tex/latex/numspell/numspell-french.sty index 8f9f1350b9b..5323efcb8b5 100644 --- a/Master/texmf-dist/tex/latex/numspell/numspell-french.sty +++ b/Master/texmf-dist/tex/latex/numspell/numspell-french.sty @@ -1,7 +1,7 @@ %% %% `numspell-french.sty' French language package for 'numspell.sty' %% -%% Copyright 2017-2020 by Tibor Tomacs +%% Copyright 2017-2021 by Tibor Tomacs %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/numspell/numspell-german.sty b/Master/texmf-dist/tex/latex/numspell/numspell-german.sty index 068b7deee94..5e9aa82c07c 100644 --- a/Master/texmf-dist/tex/latex/numspell/numspell-german.sty +++ b/Master/texmf-dist/tex/latex/numspell/numspell-german.sty @@ -1,7 +1,7 @@ %% %% `numspell-german.sty' German language package for 'numspell.sty' %% -%% Copyright 2017-2020 by Tibor Tomacs +%% Copyright 2017-2021 by Tibor Tomacs %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/numspell/numspell-italian.sty b/Master/texmf-dist/tex/latex/numspell/numspell-italian.sty index db519e4974b..32b50b4e64f 100644 --- a/Master/texmf-dist/tex/latex/numspell/numspell-italian.sty +++ b/Master/texmf-dist/tex/latex/numspell/numspell-italian.sty @@ -1,7 +1,7 @@ %% %% `numspell-italian.sty' Italian language package for 'numspell.sty' %% -%% Copyright 2017-2020 by Tibor Tomacs +%% Copyright 2017-2021 by Tibor Tomacs %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/numspell/numspell-latin.sty b/Master/texmf-dist/tex/latex/numspell/numspell-latin.sty new file mode 100644 index 00000000000..deed0f1cc1e --- /dev/null +++ b/Master/texmf-dist/tex/latex/numspell/numspell-latin.sty @@ -0,0 +1,878 @@ +%% +%% `numspell-latin.sty' Latin language package for 'numspell.sty' +%% +%% Copyright 2021 by Keno Wehr +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% 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 +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Keno Wehr. +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{numspell-latin}[2021/11/21 v1.0 Latin language package for numspell] + +%% GROUP NAMES according to Latin Wikipedia +%% https://la.wikipedia.org/wiki/Nomina_permagnorum_numerorum +\def\numspell@group@ii@la@name{\numspell@{mille}} +\def\numspell@group@iii@la@name{\numspell@{millio}} +\def\numspell@group@iv@la@name{\numspell@{milliardum}} +\def\numspell@group@v@la@name{\numspell@{billio}} +\def\numspell@group@vi@la@name{\numspell@{billiardum}} +\def\numspell@group@vii@la@name{\numspell@{trillio}} +\def\numspell@group@viii@la@name{\numspell@{trilliardum}} +\def\numspell@group@ix@la@name{\numspell@{quadrillio}} +\def\numspell@group@x@la@name{\numspell@{quadrilliardum}} +\def\numspell@group@xi@la@name{\numspell@{quintillio}} +\def\numspell@group@xii@la@name{\numspell@{quintilliardum}} +\def\numspell@group@xiii@la@name{\numspell@{sextillio}} +\def\numspell@group@xiv@la@name{\numspell@{sextilliardum}} +\def\numspell@group@xv@la@name{\numspell@{septillio}} +\def\numspell@group@xvi@la@name{\numspell@{septilliardum}} +\def\numspell@group@xvii@la@name{\numspell@{octillio}} +\def\numspell@group@xviii@la@name{\numspell@{octilliardum}} +\def\numspell@group@xix@la@name{\numspell@{nonillio}} +\def\numspell@group@xx@la@name{\numspell@{nonilliardum}} +\def\numspell@group@xxi@la@name{\numspell@{decillio}} +\def\numspell@group@xxii@la@name{\numspell@{decilliardum}} + +%% GROUP NAMES (PLURAL) +\def\numspell@group@ii@la@name@plural{\numspell@{milia}} +\def\numspell@group@iii@la@name@plural{\numspell@{milliones}} +\def\numspell@group@iv@la@name@plural{\numspell@{milliarda}} +\def\numspell@group@v@la@name@plural{\numspell@{billiones}} +\def\numspell@group@vi@la@name@plural{\numspell@{billiarda}} +\def\numspell@group@vii@la@name@plural{\numspell@{trilliones}} +\def\numspell@group@viii@la@name@plural{\numspell@{trilliarda}} +\def\numspell@group@ix@la@name@plural{\numspell@{quadrilliones}} +\def\numspell@group@x@la@name@plural{\numspell@{quadrilliarda}} +\def\numspell@group@xi@la@name@plural{\numspell@{quintilliones}} +\def\numspell@group@xii@la@name@plural{\numspell@{quintilliarda}} +\def\numspell@group@xiii@la@name@plural{\numspell@{sextilliones}} +\def\numspell@group@xiv@la@name@plural{\numspell@{sextilliarda}} +\def\numspell@group@xv@la@name@plural{\numspell@{septilliones}} +\def\numspell@group@xvi@la@name@plural{\numspell@{septilliarda}} +\def\numspell@group@xvii@la@name@plural{\numspell@{octilliones}} +\def\numspell@group@xviii@la@name@plural{\numspell@{octilliarda}} +\def\numspell@group@xix@la@name@plural{\numspell@{nonilliones}} +\def\numspell@group@xx@la@name@plural{\numspell@{nonilliarda}} +\def\numspell@group@xxi@la@name@plural{\numspell@{decilliones}} +\def\numspell@group@xxii@la@name@plural{\numspell@{decilliarda}} + +%% ORDINAL GROUP NAMES ("millesimus" can be found in the grammars, +%% the other forms have been created analogously based on Italian) +\def\numspell@ordgroup@ii@la@name{\numspell@{millesim}} +\def\numspell@ordgroup@iii@la@name{\numspell@{millionesim}} +\def\numspell@ordgroup@iv@la@name{\numspell@{milliardesim}} +\def\numspell@ordgroup@v@la@name{\numspell@{billionesim}} +\def\numspell@ordgroup@vi@la@name{\numspell@{billiardesim}} +\def\numspell@ordgroup@vii@la@name{\numspell@{trillionesim}} +\def\numspell@ordgroup@viii@la@name{\numspell@{trilliardesim}} +\def\numspell@ordgroup@ix@la@name{\numspell@{quadrillionesim}} +\def\numspell@ordgroup@x@la@name{\numspell@{quadrilliardesim}} +\def\numspell@ordgroup@xi@la@name{\numspell@{quintillionesim}} +\def\numspell@ordgroup@xii@la@name{\numspell@{quintilliardesim}} +\def\numspell@ordgroup@xiii@la@name{\numspell@{sextillionesim}} +\def\numspell@ordgroup@xiv@la@name{\numspell@{sextilliardesim}} +\def\numspell@ordgroup@xv@la@name{\numspell@{septillionesim}} +\def\numspell@ordgroup@xvi@la@name{\numspell@{septilliardesim}} +\def\numspell@ordgroup@xvii@la@name{\numspell@{octillionesim}} +\def\numspell@ordgroup@xviii@la@name{\numspell@{octilliardesim}} +\def\numspell@ordgroup@xix@la@name{\numspell@{nonillionesim}} +\def\numspell@ordgroup@xx@la@name{\numspell@{nonilliardesim}} +\def\numspell@ordgroup@xxi@la@name{\numspell@{decillionesim}} +\def\numspell@ordgroup@xxii@la@name{\numspell@{decilliardesim}} + +%% SPELLING VARIANTS +%% +%% ae, appearing in the female plural ending, was a diphthong in classical +%% Latin. In the late antiquity it became a monophthong and was written in +%% different ways later on. Like babel-latin, we use a ligature for medieval +%% and ecclesiastic Latin. +%% +%% The letter U did not exist in classical Latin. The vowel U was always +%% written as V. In the minuscule manuscripts of the Middle Ages it evolved to +%% u. The distinction of U and V is of modern origin. So we do not use U and v +%% for classical and medieval Latin, but only for modern and ecclesiastic Latin. +%% +\def\numspell@la@ae@diphthong{% + \def\numspell@la@ae{\numspell@{ae}}% +} +\def\numspell@la@ae@ligature{% + \def\numspell@la@ae{\numspell@{\ae}}% +} +\def\numspell@la@use@vocalic@V{% + \def\numspell@la@v{\numspell@{u}}% + \def\numspell@la@uppercase@u{V}% +} +\def\numspell@la@use@U@and@v{% + \def\numspell@la@v{\numspell@{v}}% + \def\numspell@la@uppercase@u{U}% +} + +%% WORDING VARIANTS +%% +%% The classical main forms of "twentieth" and "thirtieth" are "vicesimus" and +%% "tricesimus". Ecclesiastic Latin uses the more regular varints "vigesimus" +%% and "trigesimus" instead. +%% +%% The classical main form of "seventeen" is "septendecim", but later "decem et +%% septem" was used instead (e.g. Gen 47:28). We only use "septendecim" for +%% classical and modern Latin. +%% Reference: Lewis/Short, A Latin Dictionary: "septendecim was in use only +%% among the antiqui" +%% +%% The word "millio" for million is of modern origin. The classical term for +%% one million is "decies centena milia" (ten times hundred thousand). +%% The Thesaurus Linguae Latinae even documents the form "quadringenties milies +%% [centena milia]" (400 times 1000 times 100000, used by Sueton, ThLL v.s. +%% "miliens"). +%% For classical and medieval Latin we use the classical wording for cardinal +%% numbers less than 10^11 and for ordinal numbers less than 10^7. We use the +%% modern wording in other cases. +%% +\def\numspell@la@classical@ordinals{% + \def\numspell@la@twentieth{\numspell@la@v\numspell@{icesim}}% + \def\numspell@la@thirtieth{\numspell@{tricesim}}% +} +\def\numspell@la@ecclesiastic@ordinals{% + \def\numspell@la@twentieth{\numspell@la@v\numspell@{igesim}}% + \def\numspell@la@thirtieth{\numspell@{trigesim}}% +} +\def\numspell@la@classical@seventeen{% + \def\numspell@la@seventeen{\numspell@{septendecim}}% +} +\def\numspell@la@postclassical@seventeen{% + \def\numspell@la@seventeen{\numspell@{decem et septem}}% +} +\newif\ifnumspell@la@modern@million + +%% ADDITION AND SUBTRACTION, INVERSION OF ORDINALS +%% +%% Numbers ending in 8 or 9 can be formed by addition or by subtraction. +%% 28 by addition: viginti octo, 28 by subtraction: duodetriginta +%% We use subtraction for classical and modern Latin and addition for medieval +%% and ecclesiastic Latin. +%% +%% Ordinals under 20 are normally inverted (tertia decima for 13th). In +%% ecclesiastical Latin they are not inverted (decima tertia for 13th). +%% +%% The reference for medieval Latin is: +%% Peter Stotz, Handbuch zur lateinischen Sprache des Mittelalters (HLSMA) +%% +%% HLSMA 4, VIII, § 88 +%% »Die Zahlbez’en für ,11‘ bis ,19‘ sind bereits in der Antike, und so dann +%% auch im MA, recht oft durch zwei asyndetische oder mit *et* verbundene +%% einfache Zahlwörter gegeben worden: *septem (et/ac) decem* usf., etwa auch +%% *duobus decim*. Häufig aber kommen vor: *decem et quattuor*, *d. et sex*, +%% *d. et septem*, *d. et octo*, *decem et novem*. +%% An Stelle der Bildungen auf *-decim* bei ,17‘ und *-deviginti* bei ,18‘, ,19‘ +%% erscheint oft auch asyndetisches oder geeintes *decem-*: *decemseptem*, +%% *decemocto*, *decemnovem* (vgl. it. *diciasètte*, *diciòtto*, *diciannòve*). +%% (Zum Verhältnis additiver und subtraktiver Formen in diesen Fällen vgl. +%% weiter § 97.)« +%% +%% HLSMA 4, VIII, § 97.1 +%% »Subtraktive Bez’en für Zahlen unter der vollen Zehnerzahl wie *undeviginti* +%% ,19‘, *duodetriginta* ,28‘, duodeseptuagesimus ,der 68ste‘ sind auch im MA +%% noch belegt: *duo de sexaginta*, *duo de XX*, *duo de XL*. Häufig sind sie +%% nicht gewesen, und als Belege kommen selbstverständlich nur in den Hss. +%% ausgeschriebene Zahlenbenennungen in Betracht. Bereits in der Antike kommen +%% reichlich Bez’en vor wie *decem (et) octo/novem*, *octo et viginti*, *nonus +%% et vicesimus* u. a. m. (Vgl. auch § 88.) In aller Regel wurden im lat. MA +%% Formen gebraucht wie *decem et octo*, *viginti octo*. Seit Livius ist das +%% nach *undecim* usf. analogisch gebildete *octodecim* in Gebrauch; auch +%% *novemdecim* kommt vor, sodann *octavus decimus*, *nonus decimus*.« +%% +\newif\ifnumspell@la@subtraction +\newif\ifnumspell@la@invert@ordinals + +%% SETTINGS FOR LANGUAGE VARIANTS +\def\numspell@la@classical@settings{% + \numspell@la@ae@diphthong + \numspell@la@use@vocalic@V + \numspell@la@classical@ordinals + \numspell@la@classical@seventeen + \numspell@la@subtractiontrue + \numspell@la@invert@ordinalstrue + \numspell@la@modern@millionfalse +} +\def\numspell@la@medieval@settings{% + \numspell@la@ae@ligature + \numspell@la@use@vocalic@V + \numspell@la@classical@ordinals + \numspell@la@postclassical@seventeen + \numspell@la@subtractionfalse + \numspell@la@invert@ordinalstrue + \numspell@la@modern@millionfalse +} +\def\numspell@la@modern@settings{% + \numspell@la@ae@diphthong + \numspell@la@use@U@and@v + \numspell@la@classical@ordinals + \numspell@la@classical@seventeen + \numspell@la@subtractiontrue + \numspell@la@invert@ordinalstrue + \numspell@la@modern@milliontrue +} +\def\numspell@la@ecclesiastic@settings{% + \numspell@la@ae@ligature + \numspell@la@use@U@and@v + \numspell@la@ecclesiastic@ordinals + \numspell@la@postclassical@seventeen + \numspell@la@subtractionfalse + \numspell@la@invert@ordinalsfalse + \numspell@la@modern@milliontrue +} +\def\numspell@la@check@language@variant{% + \IfLanguageName{classiclatin}{% + \numspell@la@classical@settings + }{% + \IfLanguageName{medievallatin}{% + \numspell@la@medieval@settings + }{% + \IfLanguageName{ecclesiasticlatin}{% + \numspell@la@ecclesiastic@settings + }{% + \ifcsname iflanguageoption\endcsname% for polyglossia + \iflanguageoption{latin}{variant}{classic}{% + \numspell@la@classical@settings + }{% + \iflanguageoption{latin}{variant}{medieval}{% + \numspell@la@medieval@settings + }{% + \iflanguageoption{latin}{variant}{ecclesiastic}{% + \numspell@la@ecclesiastic@settings + }{% + \numspell@la@modern@settings + }% + }% + }% + \else + \numspell@la@modern@settings + \fi + }% + }% + }% +} + +%% INFLECTION ENDINGS +\def\numspelllamasculine{% + \def\numspell@la@ending@sing{\numspell@{us}}% + \def\numspell@la@ending@plural{\numspell@{i}}% + \def\numspell@la@two{\numspell@{duo}}% + \def\numspell@la@three{\numspell@{tres}}% +} +\def\numspelllafeminine{% + \def\numspell@la@ending@sing{\numspell@{a}}% + \def\numspell@la@ending@plural{\numspell@la@ae}% + \def\numspell@la@two{\numspell@{du}\numspell@la@ae}% + \def\numspell@la@three{\numspell@{tres}}% +} +\def\numspelllaneuter{% + \def\numspell@la@ending@sing{\numspell@{um}}% + \def\numspell@la@ending@plural{\numspell@{a}}% + \def\numspell@la@two{\numspell@{duo}}% + \def\numspell@la@three{\numspell@{tria}}% +} +\numspelllamasculine + +%% TERMS FOR THE ONES +\def\numspell@la@ones@cardinal#1{% + \ifcase#1% + \or\numspell@{un}\numspell@la@ending@sing\or\numspell@la@two\or\numspell@la@three + \or\numspell@{quattuor}\or\numspell@{quinque}\or\numspell@{sex}\or\numspell@{septem}% + \or\numspell@{octo}\or\numspell@{no}\numspell@la@v\numspell@{em}\or\numspell@{decem}% + \or\numspell@{undecim}\or\numspell@{duodecim}\or\numspell@{tredecim}\or\numspell@{quattuordecim}% + \or\numspell@{quindecim}\or\numspell@{sedecim}\or\numspell@la@seventeen + \fi +} + +\def\numspell@la@ones@ordinal#1{% + \ifcase#1% + \or\numspell@{prim}\or\numspell@{secund}\or\numspell@{terti}\or\numspell@{quart}% + \or\numspell@{quint}\or\numspell@{sext}\or\numspell@{septim}\or\numspell@{octa}\numspell@la@v + \or\numspell@{non}\or\numspell@{decim}\or\numspell@{undecim}\or\numspell@{duodecim}% + \fi + \numspell@la@ending@sing +} + +\def\numspell@la@ones@adverb#1{% + \ifcase#1% + \or\numspell@{semel}\or\numspell@{bis}\or\numspell@{ter}\or\numspell@{quater}% + \or\numspell@{quinquies}\or\numspell@{sexies}\or\numspell@{septies}\or\numspell@{octies}% + \or\numspell@{no}\numspell@la@v\numspell@{ies}\or\numspell@{decies}\or\numspell@{undecies}% + \or\numspell@{duodecies}% + \fi +} + +%% TERMS FOR THE TENS +\def\numspell@la@tens@cardinal#1{% + \ifcase#1% + \or\numspell@{decem}\or\numspell@la@v\numspell@{iginti}\or\numspell@{triginta}% + \or\numspell@{quadraginta}\or\numspell@{quinquaginta}\or\numspell@{sexaginta}% + \or\numspell@{septuaginta}\or\numspell@{octoginta}\or\numspell@{nonaginta}\or\numspell@{centum}% + \fi +} + +\def\numspell@la@tens@ordinal#1{% + \ifcase#1% + \or\numspell@{decim}\or\numspell@la@twentieth\or\numspell@la@thirtieth + \or\numspell@{quadragesim}\or\numspell@{quinquagesim}\or\numspell@{sexagesim}% + \or\numspell@{septuagesim}\or\numspell@{octogesim}\or\numspell@{nonagesim}\or\numspell@{centesim}% + \fi + \numspell@la@ending@sing +} + +\def\numspell@la@tens@adverb#1{% + \ifcase#1% + \or\numspell@{decies}\or\numspell@la@v\numspell@{icies}\or\numspell@{tricies}% + \or\numspell@{quadragies}\or\numspell@{quinquagies}\or\numspell@{sexagies}% + \or\numspell@{septuagies}\or\numspell@{octogies}\or\numspell@{nonagies}\or\numspell@{centies}% + \fi +} + +%% TERMS FOR THE HUNDREDS +\def\numspell@la@hundreds@cardinal#1{% + \ifcase#1% + \or\numspell@{centum}\or\numspell@{ducent}\or\numspell@{trecent}\or\numspell@{quadringent}% + \or\numspell@{quingent}\or\numspell@{sescent}\or\numspell@{septingent}\or\numspell@{octingent}% + \or\numspell@{nongent}% + \fi + \ifnum#1>1% + \numspell@la@ending@plural + \fi +} + +\def\numspell@la@hundreds@ordinal#1{% + \ifcase#1% + \or\numspell@{cent}\or\numspell@{ducent}\or\numspell@{trecent}\or\numspell@{quadringent}% + \or\numspell@{quingent}\or\numspell@{sescent}\or\numspell@{septingent}\or\numspell@{octingent}% + \or\numspell@{nongent}% + \fi + \numspell@{esim}% + \numspell@la@ending@sing +} + +\def\numspell@la@hundreds@adverb#1{% + \ifcase#1% + \or\numspell@{centies}\or\numspell@{ducenties}\or\numspell@{trecenties}% + \or\numspell@{quadringenties}\or\numspell@{quingenties}\or\numspell@{sescenties}% + \or\numspell@{septingenties}\or\numspell@{octingenties}\or\numspell@{nongenties}% + \fi +} + +%% NAMES OF SPECIAL NUMERALS +\def\numspell@la@hundred@distributive{\numspell@{centena}}% neuter form, used before "milia" +\def\numspell@la@thousand@adverb{\numspell@{milies}} + +%% MACROS FOR TWO-DIGIT NUMBERS +\def\numspell@la@addition@cardinal{% + \numspell@la@tens@cardinal\numspell@group@digit@ii + \ifnum\numspell@group@digit@iii>0% + \numspell@{ }% + \ifnum\numspell@group@digit@ii=1% + \numspell@{et }% + \fi + \numspell@la@ones@cardinal\numspell@group@digit@iii + \fi +} + +\def\numspell@la@addition@ordinal{% + \numspell@la@tens@ordinal\numspell@group@digit@ii + \ifnum\numspell@group@digit@iii>0% + \numspell@{ }% + \numspell@la@ones@ordinal\numspell@group@digit@iii + \fi +} + +\def\numspell@la@addition@adverb{% + \numspell@la@tens@adverb\numspell@group@digit@ii + \ifnum\numspell@group@digit@iii>0% + \numspell@{ }% + \numspell@la@ones@adverb\numspell@group@digit@iii + \fi +} + +\def\numspell@la@inverted@addition@ordinal{% + \ifnum\numspell@group@digit@iii>0% + \numspell@la@ones@ordinal\numspell@group@digit@iii + \numspell@{ }% + \fi + \numspell@la@tens@ordinal\numspell@group@digit@ii +} + +\def\numspell@la@inverted@addition@adverb{% + \ifnum\numspell@group@digit@iii>0% + \numspell@la@ones@adverb\numspell@group@digit@iii + \numspell@{ }% + \fi + \numspell@la@tens@adverb\numspell@group@digit@ii +} + +\newcount\numspell@la@tmp@count + +\def\numspell@la@subtraction@cardinal{% + \ifnum\numspell@group@digit@iii=8% + \numspell@{duode}% + \else + \numspell@{unde}% + \fi + \numspell@la@tmp@count\numexpr\numspell@group@digit@ii+1\relax + \numspell@la@tens@cardinal\numspell@la@tmp@count +} + +\def\numspell@la@subtraction@ordinal{% + \ifnum\numspell@group@digit@iii=8% + \numspell@{duode}% + \else + \numspell@{unde}% + \fi + \numspell@la@tmp@count\numexpr\numspell@group@digit@ii+1\relax + \numspell@la@tens@ordinal\numspell@la@tmp@count +} + +\def\numspell@la@subtraction@adverb{% + \ifnum\numspell@group@digit@iii=8% + \numspell@{duode}% + \else + \numspell@{unde}% + \fi + \numspell@la@tmp@count\numexpr\numspell@group@digit@ii+1\relax + \numspell@la@tens@adverb\numspell@la@tmp@count +} + +%% SPELLING CARDINAL NUMBER GROUP +%% --------------------------------- +%% \numspell@group@spell@la{<group>} (<group>=000,001,...,999) +%% --------------------------------- +%% \numspell@group@digits{<group>} +%% Adding the <group> spelling to \thenumspell +%% +\def\numspell@group@spell@la#1{% + \numspell@group@digits{#1}% + \ifnum\numspell@group@digit@i>0% + \numspell@la@hundreds@cardinal\numspell@group@digit@i + \ifnum\numexpr\numspell@group@digit@ii+\numspell@group@digit@iii>0% + \numspell@{ }% + \fi + \fi + \numspell@la@tmp@count\numexpr10*\numspell@group@digit@ii+\numspell@group@digit@iii\relax + \ifnum\numspell@la@tmp@count<18% 1, 2, ..., 17 + \numspell@la@ones@cardinal\numspell@la@tmp@count% unus, duo, ..., septendecim/decem et septem + \else + \ifnum\numspell@group@digit@iii>7% + \ifnum\numspell@group@digit@i=0% 18, 19, 28, 29, ..., 98, 99 + \ifnumspell@la@subtraction + \numspell@la@subtraction@cardinal% duodeviginti, ... + \else + \numspell@la@addition@cardinal% decem et octo, ..., viginti octo, ... + \fi + \else + \ifnum\numspell@group@digit@ii<9% 118, 119, 128, 129, ..., 188, 189, ..., 988, 989 + \ifnumspell@la@subtraction + \numspell@la@subtraction@cardinal% centum duodeviginti, ... + \else + \numspell@la@addition@cardinal% centum decem et octo, ... + \fi + \else% 198, 199, 298, 299, ..., 998, 999 + \numspell@la@addition@cardinal% centum nonaginta octo + \fi + \fi + \else + \ifnum\numspell@group@digit@ii>1% 20, 21, ..., 27, 30, 31, ..., 97 + \numspell@la@addition@cardinal% viginti, viginti unus, ... + \fi + \fi + \fi +} + +%% SPELLING ORDINAL NUMBER GROUP +%% ------------------------------------ +%% \numspell@ordgroup@spell@la{<group>} (<group>=000,001,...,999) +%% ------------------------------------ +%% \numspell@group@digits{<group>} +%% Adding the <group> ordinal spelling to \thenumspell +%% +\def\numspell@ordgroup@spell@la#1{% + \numspell@group@digits{#1}% + \ifnum\numspell@group@digit@i>0% + \numspell@la@hundreds@ordinal\numspell@group@digit@i + \ifnum\numexpr\numspell@group@digit@ii+\numspell@group@digit@iii>0% + \numspell@{ }% + \fi + \fi + \numspell@la@tmp@count\numexpr10*\numspell@group@digit@ii+\numspell@group@digit@iii\relax + \ifnum\numspell@la@tmp@count>0% + \ifnum\numspell@la@tmp@count<13% 1, 2, ..., 12 + \numspell@la@ones@ordinal\numspell@la@tmp@count% primus, secundus, ..., duodecimus + \else + \ifnum\numspell@la@tmp@count<18% 13, 14, ..., 17 + \ifnumspell@la@invert@ordinals + \numspell@la@inverted@addition@ordinal% tertius decimus, ... + \else + \numspell@la@addition@ordinal% decimus tertius, ... + \fi + \else + \ifnum\numspell@group@digit@iii>7% + \ifnum\numspell@group@digit@i=0% 18, 19, 28, 29, ..., 98, 99 + \ifnumspell@la@subtraction + \numspell@la@subtraction@ordinal% duodevicesimus, ... + \else + \ifnum\numspell@group@digit@ii=1% + \ifnumspell@la@invert@ordinals + \numspell@la@inverted@addition@ordinal% octavus decimus, ... + \else + \numspell@la@addition@ordinal% decimus octavus, ... + \fi + \else + \numspell@la@addition@ordinal% vicesimus octavus, ... + \fi + \fi + \else + \ifnum\numspell@group@digit@ii<9% 118, 119, 128, 129, ..., 188, 189, ..., 988, 989 + \ifnumspell@la@subtraction + \numspell@la@subtraction@ordinal% centesimus undevicesimus, ... + \else + \numspell@la@addition@ordinal% centesimus decimus octavus, ... + \fi + \else% 198, 199, 298, 299, ..., 998, 999 + \numspell@la@addition@ordinal% centesimus nonagesimus octavus, ... + \fi + \fi + \else + \ifnum\numspell@group@digit@ii>1% 20, 21, ..., 27, 30, 31, ..., 97 + \numspell@la@addition@ordinal% vicesimus, vicesimus primus, ... + \fi + \fi + \fi + \fi + \fi +} + +%% SPELLING ADVERBIAL NUMBER GROUP +\def\numspell@adverbgroup@spell@la#1{% + \numspell@group@digits{#1}% + \ifnum\numspell@group@digit@i>0% + \numspell@la@hundreds@adverb\numspell@group@digit@i + \ifnum\numexpr\numspell@group@digit@ii+\numspell@group@digit@iii>0% + \numspell@{ }% + \fi + \fi + \numspell@la@tmp@count\numexpr10*\numspell@group@digit@ii+\numspell@group@digit@iii\relax + \ifnum\numspell@la@tmp@count<13% 1, 2, ..., 12 + \numspell@la@ones@adverb\numspell@la@tmp@count% semel, bis, ..., duodecies + \else + \ifnum\numspell@la@tmp@count<18% 13, 14, ..., 17 + \ifnumspell@la@invert@ordinals + \numspell@la@inverted@addition@adverb% ter decies, quater decies, ..., septies decies + \else + \numspell@la@addition@adverb% decies ter, decies quater, ..., decies septies + \fi + \else + \ifnum\numspell@group@digit@iii>7% + \ifnum\numspell@group@digit@i=0% 18, 19, 28, 29, ..., 98, 99 + \ifnumspell@la@subtraction + \numspell@la@subtraction@adverb% duodevicies, ... + \else + \ifnum\numspell@group@digit@ii=1% 18, 19 + \ifnumspell@la@invert@ordinals + \numspell@la@inverted@addition@adverb% octies decies, ... + \else + \numspell@la@addition@adverb% decies octies, ... + \fi + \else% 28, 29, 38, 39, ..., 98, 99 + \numspell@la@addition@adverb% vicies octies, ... + \fi + \fi + \else + \ifnum\numspell@group@digit@ii<9% 118, 119, 128, 129, ..., 188, 189, ..., 988, 989 + \ifnumspell@la@subtraction + \numspell@la@subtraction@adverb% centies duodevicies, ... + \else + \numspell@la@addition@adverb + \fi + \else% 198, 199, 298, 299, ..., 998, 999 + \numspell@la@addition@adverb + \fi + \fi + \else + \ifnum\numspell@group@digit@ii>1% 20, 21, ..., 27, 30, 31, ..., 97 + \numspell@la@addition@adverb% vicies, ... + \fi + \fi + \fi + \fi +} + +%% SPELLING CARDINAL NUMBER WITH MODERN TERM FOR MILLIONS +\def\numspell@la@cardinal@modern@million{% + \setcounter{numspell@groupcount}{22}% + \@whilenum\value{numspell@groupcount}>2% + \do{% + \IfEq{\csname numspell@group@\roman{numspell@groupcount}\endcsname}{0}{}{% + \bgroup + \ifodd\thenumspell@groupcount + \numspelllafeminine% because "millio" is feminine + \else + \numspelllaneuter% because "milliardum" is neuter + \fi + \numspell@group@spell@la{\csname numspell@group@\roman{numspell@groupcount}\endcsname}% + \egroup + \numspell@{ }% + \IfEq{\csname numspell@group@\roman{numspell@groupcount}\endcsname}{1}% + {\csname numspell@group@\roman{numspell@groupcount}@la@name\endcsname}% + {\csname numspell@group@\roman{numspell@groupcount}@la@name@plural\endcsname}% + \ifnum\csname numspell@group@\roman{numspell@groupcount}@before\endcsname>0\numspell@{ }\fi + }% + \addtocounter{numspell@groupcount}{-1}% + }% + \IfEq{\numspell@group@ii}{0}{}{% + \IfEq{\numspell@group@ii}{1}{\numspell@group@ii@la@name}{% + \bgroup + \numspelllaneuter% because "milia" is neuter + \numspell@group@spell@la{\numspell@group@ii}% + \egroup + \numspell@{ }% + \numspell@group@ii@la@name@plural + }% + \ifnum\numspell@group@ii@before>0\numspell@{ }\fi + }% + \IfEq{\numspell@group@i}{0}{}{% + \numspell@group@spell@la{\numspell@group@i}% + }% +} + +%% SPELLING CARDINAL NUMBER WITH CLASSICAL TERM FOR MILLIONS +%% This outputs "decies centena milia" instead of "una millio" and +%% "decies milies centena milia" instead of "unum milliardum". +%% Modern wording is however used for numbers >= 10^11. +\def\numspell@la@cardinal@classical@million{% + \ifnum\numspell@group@max>4% + \numspell@la@cardinal@modern@million + \else + \ifnum\numspell@group@iv>99% + \numspell@la@cardinal@modern@million + \else + \StrMid{\numspell@fullnum}{56}{58}[\numspell@la@hundred@millions]% + \StrMid{\numspell@fullnum}{59}{61}[\numspell@la@hundred@thousands]% + \StrMid{\numspell@fullnum}{62}{63}[\numspell@la@thousands]% + \ifnum\numspell@la@hundred@millions>0% + \ifnum\numspell@la@hundred@millions>1% + \numspell@adverbgroup@spell@la{\numspell@la@hundred@millions}% + \numspell@{ }% + \fi + \numspell@la@thousand@adverb + \ifnum\numspell@la@hundred@thousands>0% + \numspell@{ }% + \numspell@adverbgroup@spell@la{\numspell@la@hundred@thousands}% + \numspell@{ }% + \numspell@la@hundred@distributive + \numspell@{ }% + \else + \numspell@{ }% + \numspell@la@hundred@distributive + \numspell@{ }% + \fi + \ifnum\numspell@la@thousands>0% + \numspell@{et }% + \bgroup + \numspelllaneuter% because "milia" is neuter + \numspell@group@spell@la{0\numspell@la@thousands}% + \egroup + \numspell@{ }% + \fi + \numspell@group@ii@la@name@plural% "milia" + \ifnum\numspell@group@ii@before>0% + \numspell@{ }% + \fi + \else + \ifnum\numspell@la@hundred@thousands>9% 100000 is "centum milia", not "semel centena milia" + \numspell@adverbgroup@spell@la{\numspell@la@hundred@thousands}% + \numspell@{ }% + \numspell@la@hundred@distributive + \numspell@{ }% + \ifnum\numspell@la@thousands>0% + \numspell@{et }% + \bgroup + \numspelllaneuter% because "milia" is neuter + \numspell@group@spell@la{0\numspell@la@thousands}% + \egroup + \numspell@{ }% + \fi + \numspell@group@ii@la@name@plural% "milia" + \ifnum\numspell@group@ii@before>0% + \numspell@{ }% + \fi + \else + \StrMid{\numspell@fullnum}{61}{63}[\numspell@la@thousands]% + \ifnum\numspell@la@thousands>0% + \ifnum\numspell@la@thousands=1% + \numspell@group@ii@la@name + \else + \bgroup + \numspelllaneuter% because "milia" is neuter + \IfEq{\numspell@group@iii}{0}{% + \numspell@group@spell@la{\numspell@la@thousands}% + }{% + \numspell@group@spell@la{0\numspell@la@thousands}% + }% + \egroup + \numspell@{ }% + \numspell@group@ii@la@name@plural + \fi + \ifnum\numspell@group@ii@before>0% + \numspell@{ }% + \fi + \fi + \fi + \fi + \IfEq{\numspell@group@i}{0}{}{% + \numspell@group@spell@la{\numspell@group@i}% + }% + \fi + \fi +} + +%% SPELLING CARDINAL NUMBER +%% -------------------------------------- +%% \numspell@num@spell@la{<num1>}{<num2>} +%% -------------------------------------- +%% \numspell@groups{<num1>}{<num2>} +%% Adding the \numspell@num spelling to \thenumspell +%% +\def\numspell@num@spell@la#1#2{% + \numspell@la@check@language@variant + \gdef\thenumspell{}% + \numspell@groups{#1}{#2}% + \ifnum\numspell@group@max=0% + \numspell@{null}\numspell@la@ending@sing + \else + \ifnumspell@la@modern@million + \numspell@la@cardinal@modern@million + \else + \numspell@la@cardinal@classical@million + \fi + \fi +} + +%% SPELLING ORDINAL NUMBER WITH MODERN TERM FOR MILLIONS +\def\numspell@la@ordinal@modern@million{% + \setcounter{numspell@groupcount}{22}% + \@whilenum\value{numspell@groupcount}>1% + \do{% + \IfEq{\csname numspell@group@\roman{numspell@groupcount}\endcsname}{0}{}{% + \IfEq{\csname numspell@group@\roman{numspell@groupcount}\endcsname}{1}% + {\csname numspell@ordgroup@\roman{numspell@groupcount}@la@name\endcsname}% + {% + \numspell@adverbgroup@spell@la{\csname numspell@group@\roman{numspell@groupcount}\endcsname}% + \numspell@{ }% + \csname numspell@ordgroup@\roman{numspell@groupcount}@la@name\endcsname + }% + \numspell@la@ending@sing + \ifnum\csname numspell@group@\roman{numspell@groupcount}@before\endcsname>0\numspell@{ }\fi + }% + \addtocounter{numspell@groupcount}{-1}% + }% + \IfEq{\numspell@group@i}{0}{}{% + \numspell@ordgroup@spell@la{\numspell@group@i}% + }% +} + +%% SPELLING ORDINAL NUMBER WITH CLASSICAL TERM FOR MILLIONS +%% This outputs "decies centies millesimus" instead of "millionesimus". +%% +%% Reference: Kühner/Holzweissig, Ausführliche Grammatik der lateinischen +%% Sprache, vol. 1, 2nd edition, 1912, p. 632 +%% +%% Modern wording is however used for numbers >= 10^7. +\def\numspell@la@ordinal@classical@million{% + \ifnum\numspell@group@max>3% + \numspell@la@ordinal@modern@million + \else + \ifnum\numspell@group@iii>9% + \numspell@la@ordinal@modern@million + \else + \StrMid{\numspell@fullnum}{60}{61}[\numspell@la@hundred@thousands]% + \ifnum\numspell@la@hundred@thousands>9% + \numspell@adverbgroup@spell@la{0\numspell@la@hundred@thousands}% + \numspell@{ }% + \numspell@la@hundreds@adverb{1}% + \numspell@{ }% + \StrMid{\numspell@fullnum}{62}{63}[\numspell@la@thousands]% + \ifnum\numspell@la@thousands>0% + \numspell@adverbgroup@spell@la{0\numspell@la@thousands}% + \numspell@{ }% + \fi + \numspell@ordgroup@ii@la@name + \numspell@la@ending@sing + \ifnum\numspell@group@i>0% + \numspell@{ }% + \numspell@ordgroup@spell@la{\numspell@group@i}% + \fi + \else + \numspell@la@ordinal@modern@million% no difference between classical and modern + \fi + \fi + \fi +} + +%% SPELLING ORDINAL NUMBER +%% ----------------------------------------- +%% \numspell@ordnum@spell@la{<num1>}{<num2>} +%% ----------------------------------------- +%% \numspell@groups{<num1>}{<num2>} +%% Adding the \numspell@num ordinal spelling to \thenumspell +%% +\def\numspell@ordnum@spell@la#1#2{% + \numspell@la@check@language@variant + \gdef\thenumspell{}% + \numspell@groups{#1}{#2}% + \ifnum\numspell@group@max=0% + \numspell@{nullesim}\numspell@la@ending@sing + \else + \ifnumspell@la@modern@million + \numspell@la@ordinal@modern@million + \else + \numspell@la@ordinal@classical@million + \fi + \fi +} + +%% ---------------------- +%% \numspell@uppercase@la +%% ---------------------- +%% E.g. \def\thenumspell{unus}\numspell@uppercase\thenumspell --> 'Unus' +%% \MakeUppercase does not work on pdf bookmark (see hyperref), so using another effective macro. +%% +\def\numspell@uppercase@la{% + \fullexpandarg + \StrChar{\thenumspell}{1}[\numspell@firstletter]% + \expandarg + \StrGobbleLeft{\thenumspell}{1}[\numspell@trunc]% + \fullexpandarg + \def\numspell@the{}% + \IfStrEq{\numspell@firstletter}{u}{\g@addto@macro\numspell@the{\numspell@la@uppercase@u}}{}% unus + \IfStrEq{\numspell@firstletter}{d}{\g@addto@macro\numspell@the{D}}{}% duo + \IfStrEq{\numspell@firstletter}{t}{\g@addto@macro\numspell@the{T}}{}% tres + \IfStrEq{\numspell@firstletter}{q}{\g@addto@macro\numspell@the{Q}}{}% quattuor + \IfStrEq{\numspell@firstletter}{s}{\g@addto@macro\numspell@the{S}}{}% sex + \IfStrEq{\numspell@firstletter}{o}{\g@addto@macro\numspell@the{O}}{}% octo + \IfStrEq{\numspell@firstletter}{n}{\g@addto@macro\numspell@the{N}}{}% novem + \IfStrEq{\numspell@firstletter}{v}{\g@addto@macro\numspell@the{V}}{}% viginti + \IfStrEq{\numspell@firstletter}{c}{\g@addto@macro\numspell@the{C}}{}% centum + \IfStrEq{\numspell@firstletter}{m}{\g@addto@macro\numspell@the{M}}{}% mille + \IfStrEq{\numspell@firstletter}{p}{\g@addto@macro\numspell@the{P}}{}% primus + \IfStrEq{\numspell@firstletter}{b}{\g@addto@macro\numspell@the{B}}{}% bis + \ifx\numspell@the\@empty\@latexerr{'numspell.sty' error! There is not '\numspell@firstletter' in uppercase!}{}\fi + \g@addto@macro\numspell@the{\numspell@trunc}% + \def\thenumspell{\numspell@the}% +} + +\endinput diff --git a/Master/texmf-dist/tex/latex/numspell/numspell-magyar.sty b/Master/texmf-dist/tex/latex/numspell/numspell-magyar.sty index 7634b64f909..978410a5ec0 100644 --- a/Master/texmf-dist/tex/latex/numspell/numspell-magyar.sty +++ b/Master/texmf-dist/tex/latex/numspell/numspell-magyar.sty @@ -1,7 +1,7 @@ %% %% `numspell-magyar.sty' Hungarian language package for 'numspell.sty' %% -%% Copyright 2017-2020 by Tibor Tomacs +%% Copyright 2017-2021 by Tibor Tomacs %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/numspell/numspell.sty b/Master/texmf-dist/tex/latex/numspell/numspell.sty index ccd615f3963..df8cbc1d1d9 100644 --- a/Master/texmf-dist/tex/latex/numspell/numspell.sty +++ b/Master/texmf-dist/tex/latex/numspell/numspell.sty @@ -3,7 +3,7 @@ %% %% Package for spelling the non-negative cardinal and ordinal numbers (maximum 66 digits). %% -%% Copyright 2017-2020 by Tibor Tomacs +%% Copyright 2017-2021 by Tibor Tomacs %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -18,7 +18,7 @@ %% The Current Maintainer of this work is Tibor Tomacs. %% \NeedsTeXFormat{LaTeX2e}[2020/10/01] -\ProvidesPackage{numspell}[2020/11/11 v1.4 Package for spelling cardinal and ordinal numbers] +\ProvidesPackage{numspell}[2021/11/23 v1.5 Package for spelling cardinal and ordinal numbers] \RequirePackage{xstring,iflang} @@ -43,7 +43,7 @@ } %% -------------------------------- -%% \numspell@groups{<num1>}{<num2>} (<num1>*10^<num2>=0,1,...,999999999999...9 (66 digits)=10^67-1) +%% \numspell@groups{<num1>}{<num2>} (<num1>*10^<num2>=0,1,...,999999999999...9 = 10^66-1 (66 digits)) %% -------------------------------- %% It generates the following parameters: %% @@ -242,6 +242,10 @@ \IfLanguageName{ngerman}{\@numspell@lang@notsupported@false\def\numspell@langname{de}}{}% \IfLanguageName{french}{\@numspell@lang@notsupported@false\def\numspell@langname{fr}}{}% \IfLanguageName{italian}{\@numspell@lang@notsupported@false\def\numspell@langname{it}}{}% + \IfLanguageName{latin}{\@numspell@lang@notsupported@false\def\numspell@langname{la}}{}% + \IfLanguageName{classiclatin}{\@numspell@lang@notsupported@false\def\numspell@langname{la}}{}% + \IfLanguageName{medievallatin}{\@numspell@lang@notsupported@false\def\numspell@langname{la}}{}% + \IfLanguageName{ecclesiasticlatin}{\@numspell@lang@notsupported@false\def\numspell@langname{la}}{}% \if@numspell@lang@notsupported@\PackageWarning{numspell}{\languagename\space is not supported language in numspell}\fi% } @@ -257,6 +261,10 @@ \ifdefined\datengerman\RequirePackage{numspell-german}\fi% \ifdefined\datefrench\RequirePackage{numspell-french}\fi% \ifdefined\dateitalian\RequirePackage{numspell-italian}\fi% +\ifdefined\datelatin\RequirePackage{numspell-latin}\fi% +\ifdefined\dateclassiclatin\RequirePackage{numspell-latin}\fi% +\ifdefined\datemedievallatin\RequirePackage{numspell-latin}\fi% +\ifdefined\dateecclesiasticlatin\RequirePackage{numspell-latin}\fi% } %% --------------------------------- |