<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%%
%% `numspell-english.sty' English language package for 'numspell.sty'
%%
%% Copyright 2017-2025 by Tibor Tómács
%%
%% 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 Tibor Tómács.
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{numspell-english}[2020/11/11 v1.2 English language package for numspell]

\def\numspell@and@en{\numspell@{ and }}
\def\numspell@and@@en{\numspell@{, }}% It was 'and' in v1.0

%% -----------
%% \numspellGB
%% -----------
%% It changes to British English
%%
\def\numspellGB{%
    \def\numspell@US{}%
    \def\numspell@and@en{\numspell@{ and }}%
    \def\numspell@and@@en{\numspell@{, }}% It was 'and' in v1.0
}

%% -----------
%% \numspellUS
%% -----------
%% It changes to American English
%%
\def\numspell@US{%
    \def\numspell@and@en{\numspell@{ }}%
    \def\numspell@and@@en{\numspell@{, }}%
}
\def\numspellUS{%
    \def\numspell@and@en{\numspell@{ }}%
    \def\numspell@and@@en{\numspell@{, }}%
}

%% GROUP NAMES
\def\numspell@group@ii@en@name{\numspell@{thousand}}
\def\numspell@group@iii@en@name{\numspell@{million}}
\def\numspell@group@iv@en@name{\numspell@{billion}}
\def\numspell@group@v@en@name{\numspell@{trillion}}
\def\numspell@group@vi@en@name{\numspell@{quadrillion}}
\def\numspell@group@vii@en@name{\numspell@{quintillion}}
\def\numspell@group@viii@en@name{\numspell@{sextillion}}
\def\numspell@group@ix@en@name{\numspell@{septillion}}
\def\numspell@group@x@en@name{\numspell@{octillion}}
\def\numspell@group@xi@en@name{\numspell@{nonillion}}
\def\numspell@group@xii@en@name{\numspell@{decillion}}
\def\numspell@group@xiii@en@name{\numspell@{undecillion}}
\def\numspell@group@xiv@en@name{\numspell@{duodecillion}}
\def\numspell@group@xv@en@name{\numspell@{tredecillion}}
\def\numspell@group@xvi@en@name{\numspell@{quattuordecillion}}
\def\numspell@group@xvii@en@name{\numspell@{quindecillion}}
\def\numspell@group@xviii@en@name{\numspell@{sexdecillion}}
\def\numspell@group@xix@en@name{\numspell@{septendecillion}}
\def\numspell@group@xx@en@name{\numspell@{octodecillion}}
\def\numspell@group@xxi@en@name{\numspell@{novemdecillion}}
\def\numspell@group@xxii@en@name{\numspell@{vigintillion}}

%% SPELLING CARDINAL NUMBER GROUP
%% ---------------------------------
%% \numspell@group@spell@en{&lt;group&gt;} (&lt;group&gt;=000,001,...,999)
%% ---------------------------------
%% \numspell@group@digits{&lt;group&gt;}
%% Adding the &lt;group&gt; spelling to \thenumspell
%%
\def\numspell@group@spell@en#1{%
    \numspell@group@digits{#1}%
    \ifcase\numspell@group@digit@i%
        \or\numspell@{one}\or\numspell@{two}\or\numspell@{three}\or\numspell@{four}\or\numspell@{five}%
        \or\numspell@{six}\or\numspell@{seven}\or\numspell@{eight}\or\numspell@{nine}%
    \fi%
    \ifnum\numspell@group@digit@i&gt;0%
        \numspell@{ hundred}%
    \fi%
    \ifnum\number\numexpr\numspell@group@digit@i*(\numspell@group@digit@ii+\numspell@group@digit@iii)&gt;0%
        \numspell@and@en%
    \fi%
    \ifcase\numspell@group@digit@ii%
        \or\or\numspell@{twenty}\or\numspell@{thirty}\or\numspell@{forty}\or\numspell@{fifty}\or\numspell@{sixty}%
        \or\numspell@{seventy}\or\numspell@{eighty}\or\numspell@{ninety}%
    \fi%
    \ifnum\numspell@group@digit@ii&gt;1%
        \ifcase\numspell@group@digit@iii%
            \or\numspell@dash@\numspell@{one}\or\numspell@dash@\numspell@{two}\or\numspell@dash@\numspell@{three}%
            \or\numspell@dash@\numspell@{four}\or\numspell@dash@\numspell@{five}\or\numspell@dash@\numspell@{six}%
            \or\numspell@dash@\numspell@{seven}\or\numspell@dash@\numspell@{eight}\or\numspell@dash@\numspell@{nine}%
        \fi%
    \fi%
    \ifnum\numspell@group@digit@ii&lt;2%
        \ifcase\number\numexpr10*\numspell@group@digit@ii+\numspell@group@digit@iii%
            \or\numspell@{one}\or\numspell@{two}\or\numspell@{three}\or\numspell@{four}\or\numspell@{five}\or\numspell@{six}%
            \or\numspell@{seven}\or\numspell@{eight}\or\numspell@{nine}\or\numspell@{ten}\or\numspell@{eleven}\or\numspell@{twelve}%
            \or\numspell@{thirteen}\or\numspell@{fourteen}\or\numspell@{fifteen}\or\numspell@{sixteen}\or\numspell@{seventeen}%
            \or\numspell@{eighteen}\or\numspell@{nineteen}%
        \fi%
    \fi%
}

%% SPELLING ORDINAL NUMBER GROUP
%% ------------------------------------
%% \numspell@ordgroup@spell@en{&lt;group&gt;} (&lt;group&gt;=000,001,...,999)
%% ------------------------------------
%% \numspell@group@digits{&lt;group&gt;}
%% Adding the &lt;group&gt; ordinal spelling to \thenumspell
%%
\def\numspell@ordgroup@spell@en#1{%
    \numspell@group@digits{#1}%
    \ifcase\numspell@group@digit@i%
        \or\numspell@{one}\or\numspell@{two}\or\numspell@{three}\or\numspell@{four}\or\numspell@{five}%
        \or\numspell@{six}\or\numspell@{seven}\or\numspell@{eight}\or\numspell@{nine}%
    \fi%
    \ifnum\numspell@group@digit@i&gt;0%
        \ifnum\number\numexpr\numspell@group@digit@i*(\numspell@group@digit@ii+\numspell@group@digit@iii)&gt;0%
            \numspell@{ hundred}%
        \else%
            \numspell@{ hundredth}%
        \fi%
    \fi%
    \ifnum\number\numexpr\numspell@group@digit@i*(\numspell@group@digit@ii+\numspell@group@digit@iii)&gt;0%
        \numspell@and@en%
    \fi%
    \ifnum\numspell@group@digit@iii&gt;0%
        \ifcase\numspell@group@digit@ii%
            \or\or\numspell@{twenty}\or\numspell@{thirty}\or\numspell@{forty}\or\numspell@{fifty}\or\numspell@{sixty}%
            \or\numspell@{seventy}\or\numspell@{eighty}\or\numspell@{ninety}%
        \fi%
    \else%
        \ifcase\numspell@group@digit@ii%
            \or\or\numspell@{twentieth}\or\numspell@{thirtieth}\or\numspell@{fortieth}\or\numspell@{fiftieth}%
            \or\numspell@{sixtieth}\or\numspell@{seventieth}\or\numspell@{eightieth}\or\numspell@{ninetieth}%
        \fi%
    \fi%
    \ifnum\numspell@group@digit@ii&gt;1%
        \ifcase\numspell@group@digit@iii%
            \or\numspell@dash@\numspell@{first}\or\numspell@dash@\numspell@{second}\or\numspell@dash@\numspell@{third}%
            \or\numspell@dash@\numspell@{fourth}\or\numspell@dash@\numspell@{fifth}\or\numspell@dash@\numspell@{sixth}%
            \or\numspell@dash@\numspell@{seventh}\or\numspell@dash@\numspell@{eighth}\or\numspell@dash@\numspell@{ninth}%
        \fi%
    \fi%
    \ifnum\numspell@group@digit@ii&lt;2%
        \ifcase\number\numexpr10*\numspell@group@digit@ii+\numspell@group@digit@iii%
            \or\numspell@{first}\or\numspell@{second}\or\numspell@{third}\or\numspell@{fourth}\or\numspell@{fifth}%
            \or\numspell@{sixth}\or\numspell@{seventh}\or\numspell@{eighth}\or\numspell@{ninth}\or\numspell@{tenth}%
            \or\numspell@{eleventh}\or\numspell@{twelfth}\or\numspell@{thirteenth}\or\numspell@{fourteenth}%
            \or\numspell@{fifteenth}\or\numspell@{sixteenth}\or\numspell@{seventeenth}\or\numspell@{eighteenth}\or\numspell@{nineteenth}%
        \fi%
    \fi%
}

%% SPELLING CARDINAL NUMBER
%% --------------------------------------
%% \numspell@num@spell@en{&lt;num1&gt;}{&lt;num2&gt;}
%% --------------------------------------
%% \numspell@groups{&lt;num1&gt;}{&lt;num2&gt;}
%% Adding the \numspell@num spelling to \thenumspell
%%
\def\numspell@num@spell@en#1#2{%
    \gdef\thenumspell{}%
    \numspell@groups{#1}{#2}%
    \setcounter{numspell@groupcount}{22}%
    \@whilenum\value{numspell@groupcount}&gt;2%
    \do{%
        \IfEq{\csname numspell@group@\roman{numspell@groupcount}\endcsname}{0}{}{%
            \numspell@group@spell@en{\csname numspell@group@\roman{numspell@groupcount}\endcsname}%
            \numspell@{ }%
            \csname numspell@group@\roman{numspell@groupcount}@en@name\endcsname%
            \ifnum\csname numspell@group@\roman{numspell@groupcount}@before\endcsname&gt;1\numspell@{, }\fi%
            \ifnum\csname numspell@group@\roman{numspell@groupcount}@before\endcsname=1\numspell@and@@en\fi%
        }%
        \addtocounter{numspell@groupcount}{-1}%
    }%
    \IfEq{\numspell@group@ii}{0}{}{%
        \numspell@group@spell@en{\numspell@group@ii}%
        \numspell@{ }%
        \numspell@group@ii@en@name%
        \ifnum\numspell@group@ii@before=1\numspell@and@@en\fi%
    }%
    \IfEq{\numspell@group@i}{0}{}{%
        \numspell@group@spell@en{\numspell@group@i}%
    }%
    \ifnum\numspell@group@max=0\numspell@{nought}\fi%
}

%% SPELLING ORDINAL NUMBER
%% -----------------------------------------
%% \numspell@ordnum@spell@en{&lt;num1&gt;}{&lt;num2&gt;}
%% -----------------------------------------
%% \numspell@groups{&lt;num1&gt;}{&lt;num2&gt;}
%% Adding the \numspell@num ordinal spelling to \thenumspell
%%
\def\numspell@ordnum@spell@en#1#2{%
    \gdef\thenumspell{}%
    \numspell@groups{#1}{#2}%
    \setcounter{numspell@groupcount}{22}%
    \@whilenum\value{numspell@groupcount}&gt;2%
    \do{%
        \IfEq{\csname numspell@group@\roman{numspell@groupcount}\endcsname}{0}{}{%
            \numspell@group@spell@en{\csname numspell@group@\roman{numspell@groupcount}\endcsname}%
            \numspell@{ }%
            \csname numspell@group@\roman{numspell@groupcount}@en@name\endcsname%
            \ifnum\csname numspell@group@\roman{numspell@groupcount}@before\endcsname&gt;1\numspell@{, }\fi%
            \ifnum\csname numspell@group@\roman{numspell@groupcount}@before\endcsname=1\numspell@and@@en\fi%
        }%
        \addtocounter{numspell@groupcount}{-1}%
    }%
    \IfEq{\numspell@group@ii}{0}{}{%
        \numspell@group@spell@en{\numspell@group@ii}%
        \numspell@{ }%
        \numspell@group@ii@en@name%
        \ifnum\numspell@group@ii@before=1\numspell@and@@en\fi%
    }%
    \IfEq{\numspell@group@i}{0}{}{%
        \numspell@ordgroup@spell@en{\numspell@group@i}%
    }%
    \IfEq{\numspell@group@i}{0}{\ifnum\numspell@group@max&gt;0\numspell@{th}\fi}{}%
    \ifnum\numspell@group@max=0\numspell@{zeroth}\fi%
}

%% ----------------------
%% \numspell@uppercase@en
%% ----------------------
%% E.g. \def\thenumspell{one}\numspell@uppercase\thenumspell --&gt; 'One'
%% \MakeUppercase does not work on pdf bookmark (see hyperref), so using another effective macro.
%%
\def\numspell@uppercase@en{%
    \fullexpandarg%
    \StrChar{\thenumspell}{1}[\numspell@firstletter]%
    \expandarg%
    \StrGobbleLeft{\thenumspell}{1}[\numspell@trunc]%
    \fullexpandarg%
    \def\numspell@the{}%
    \IfStrEq{\numspell@firstletter}{o}{\g@addto@macro\numspell@the{O}}{}% one
    \IfStrEq{\numspell@firstletter}{t}{\g@addto@macro\numspell@the{T}}{}% two
    \IfStrEq{\numspell@firstletter}{f}{\g@addto@macro\numspell@the{F}}{}% four
    \IfStrEq{\numspell@firstletter}{s}{\g@addto@macro\numspell@the{S}}{}% six
    \IfStrEq{\numspell@firstletter}{e}{\g@addto@macro\numspell@the{E}}{}% eight
    \IfStrEq{\numspell@firstletter}{n}{\g@addto@macro\numspell@the{N}}{}% nine
    \IfStrEq{\numspell@firstletter}{z}{\g@addto@macro\numspell@the{Z}}{}% zero
    \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</pre></body></html>