From 5ca3facf87a90c246e0525fadbc9b7831a86bf34 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Wed, 11 Nov 2020 22:02:29 +0000
Subject: numspell (11nov20)

git-svn-id: svn://tug.org/texlive/trunk@56912 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/doc/latex/numspell/numspell.tex | 113 +++++++++-------------
 1 file changed, 47 insertions(+), 66 deletions(-)

(limited to 'Master/texmf-dist/doc/latex/numspell/numspell.tex')

diff --git a/Master/texmf-dist/doc/latex/numspell/numspell.tex b/Master/texmf-dist/doc/latex/numspell/numspell.tex
index c28766044db..99128819f99 100644
--- a/Master/texmf-dist/doc/latex/numspell/numspell.tex
+++ b/Master/texmf-dist/doc/latex/numspell/numspell.tex
@@ -30,10 +30,14 @@
 \setlength{\parskip}{6pt}
 
 \lstnewenvironment{examplelst}{\lstset{
-belowskip=\bigskipamount,
+%belowskip=\bigskipamount,
 basicstyle=\ttfamily,
 backgroundcolor=\color{black!10},
+frame=trbl,
+framesep=3pt,
 columns=fullflexible,
+xleftmargin=3.4pt,
+xrightmargin=3.4pt, 
 keepspaces}}{}
 
 \newcommand{\commandinline}{\lstinline[
@@ -52,7 +56,7 @@ keepspaces]}
 
 \begin{document}
 
-\title{The {\bfseries\sffamily numspell} package\\{\large v1.3 (2020/11/07)}}
+\title{The {\bfseries\sffamily numspell} package\\{\large v1.4 (2020/11/11)}}
 \author{Tibor Tómács\\{\normalsize\url{tomacs.tibor@uni-eszterhazy.hu}}}
 \date{}
 \maketitle
@@ -63,7 +67,7 @@ The aim of the \texttt{numspell} package is to spell the cardinal and ordinal nu
 The supported languages are English (British and American), French, German, Hungarian and Italian.
 The spelling will happen in the current language.
 
-The \texttt{numspell} package requires the services of the following packages: \texttt{xstring}, \texttt{etoolbox}, \texttt{iflang}.
+The \texttt{numspell} package requires the services of the \texttt{xstring} and \texttt{iflang} packages.
 
 Load the package as usual, with
 \begin{flushleft}
@@ -231,6 +235,15 @@ For example
 \thenumspellMyNum
 \end{description}
 
+\section{Commands for English language}
+If the \texttt{english}, \texttt{british}, \texttt{ukenglish} or \texttt{UKenglish} language is active, then the number spelling will happen in British English. But it will be in American English, if the \texttt{american}, \texttt{usenglish} or \texttt{USenglish} language is active.
+\begin{description}
+\item\commandinline|\numspellUS|\\
+Using British English, you can rechange the number spelling to American English by this command.
+\item\commandinline|\numspellGB|\\
+Using American English, you can rechange the number spelling to British English by this command.
+\end{description}
+
 \section{Commands for French language}
 The following commands only work, if \texttt{french} language is active.
 \begin{description}
@@ -246,7 +259,7 @@ but \verb|\numspellpremiere\ordnumspell{1}| $\to$ {\numspellpremiere\ordnumspell
 \end{description}
 
 \section{Commands for Hungarian language}
-The following commands only work, if \texttt{magyar} language is active.
+The following commands only work, if \texttt{magyar} or \texttt{hungarian} language is active.
 \begin{description}
 \item\commandinline|\anumspell[!<zeros>!]{!<num>!}|\\
 It works like \verb|\numspell|, but the number spelling will start with Hungarian definite article. For example
@@ -337,10 +350,9 @@ The ordinal numbers will be printed in feminine form. For example\\
 \end{description}
 
 \section{Examples}
-\subsection*{Example \stepcounter{subsection}\arabic{subsection}}
+
 \begin{examplelst}
 \documentclass{article}
-\usepackage[utf8]{inputenc}
 \usepackage[T1]{fontenc}
 \usepackage[magyar,italian,ngerman,french,english]{babel}
 \usepackage{numspell}
@@ -349,80 +361,56 @@ The ordinal numbers will be printed in feminine form. For example\\
 \def\mynum{123456789}
 \noindent
 In British English the spelling of \num{\mynum} is
-\emph{``\numspell{\mynum}''}.
+\emph{\numspell{\mynum}}.
 \par\smallskip\noindent
 In American English the spelling of \num{\mynum} is
-{\selectlanguage{american}\emph{``\numspell{\mynum}''}}.
+\foreignlanguage{american}{\em\numspell{\mynum}}.
 \par\smallskip\noindent
 In French the spelling of \num{\mynum} is
-{\selectlanguage{french}\emph{``\numspell{\mynum}''}}.
+\foreignlanguage{french}{\em\numspell{\mynum}}.
 \par\smallskip\noindent
 In German the spelling of \num{\mynum} is
-{\selectlanguage{ngerman}\emph{``\numspell{\mynum}''}}.
+\foreignlanguage{ngerman}{\em\numspell{\mynum}}.
 \par\smallskip\noindent
 In Hungarian the spelling of \num{\mynum} is
-{\selectlanguage{magyar}\emph{`'\numspell{\mynum}''}}.
+\foreignlanguage{magyar}{\em\numspell{\mynum}}.
 \par\smallskip\noindent
 In Italian the spelling of \num{\mynum} is
-{\selectlanguage{italian}\emph{``\numspell{\mynum}''}}.
+\foreignlanguage{italian}{\em\numspell{\mynum}}.
 \end{document}
 \end{examplelst}
-
 \def\mynum{123456789}
-
 \noindent
 In British English the spelling of \num{\mynum} is
-\emph{``\numspell{\mynum}''}.
-
-\smallskip\noindent
+\emph{\numspell{\mynum}}.
+\par\smallskip\noindent
 In American English the spelling of \num{\mynum} is
-{\selectlanguage{american}\emph{``\numspell{\mynum}''}}.
-
-\smallskip\noindent
+\foreignlanguage{american}{\em\numspell{\mynum}}.
+\par\smallskip\noindent
 In French the spelling of \num{\mynum} is
-{\selectlanguage{french}\emph{``\numspell{\mynum}''}}.
-
-\smallskip\noindent
+\foreignlanguage{french}{\em\numspell{\mynum}}.
+\par\smallskip\noindent
 In German the spelling of \num{\mynum} is
-{\selectlanguage{ngerman}\emph{``\numspell{\mynum}''}}.
-
-\smallskip\noindent
+\foreignlanguage{ngerman}{\em\numspell{\mynum}}.
+\par\smallskip\noindent
 In Hungarian the spelling of \num{\mynum} is
-{\selectlanguage{magyar}\emph{`'\numspell{\mynum}''}}.
-
-\smallskip\noindent
+\foreignlanguage{magyar}{\em\numspell{\mynum}}.
+\par\smallskip\noindent
 In Italian the spelling of \num{\mynum} is
-{\selectlanguage{italian}\emph{``\numspell{\mynum}''}}.
+\foreignlanguage{italian}{\em\numspell{\mynum}}.
 
-\bigskip
-\subsection*{Example \stepcounter{subsection}\arabic{subsection}}
-\begin{examplelst}
-\documentclass{article}
-\usepackage{numspell}
-\usepackage[group-separator={,}]{siunitx}
-\begin{document}
-\def\mynum{123456789012345678901234567890123456789012345678901234567890123456}
-\Numspell{\mynum}, that is \num{\mynum}.
-\end{document}
-\end{examplelst}
-
-\def\mynum{123456789012345678901234567890123456789012345678901234567890123456}
-\Numspell{\mynum}, that is \num{\mynum}.
-
-\bigskip
-\subsection*{Example \stepcounter{subsection}\arabic{subsection}}
 \begin{examplelst}
 \documentclass{article}
 \usepackage{numspell}
 \newcounter{mycount}
-\makeatletter
 \begin{document}
 The
+\makeatletter
 \@whilenum\value{mycount}<51
 \do{\ordnumspell{\themycount}\stepcounter{mycount},\ }\dots
+\makeatother
 \end{document}
 \end{examplelst}
-
 \makeatletter
 \newcounter{mycount}
 The
@@ -430,21 +418,19 @@ The
 \do{\ordnumspell{\themycount}\stepcounter{mycount},\ }\dots
 \makeatother
 
-\bigskip
-\subsection*{Example \stepcounter{subsection}\arabic{subsection}}
 \begin{examplelst}
 \documentclass{article}
 \usepackage{numspell}
 \newcounter{mycount}
 \def\themycount{\numspell{\arabic{mycount}}}
-\makeatletter
 \begin{document}
 \Numspell{0},
+\makeatletter
 \@whilenum\value{mycount}<30
 \do{\stepcounter{mycount}\themycount,\ }\dots
+\makeatother
 \end{document}
 \end{examplelst}
-
 \def\themycount{\numspell{\arabic{mycount}}}
 \setcounter{mycount}{0}
 \makeatletter
@@ -453,7 +439,6 @@ The
 \do{\stepcounter{mycount}\themycount,\ }\dots
 \makeatother
 
-\bigskip
 \section{Limitations}
 Do not use the \verb|\numspell|, \verb|\numspell*|, \verb|\Numspell|, \verb|\Numspell*|, etc.\ commands inside sectioning commands and \verb|\MakeUppercase|.
 An example for the illustration of the problem:
@@ -469,24 +454,20 @@ An example for the illustration of the problem:
 Text
 \end{document}
 \end{examplelst}
-\noindent
-\textbf{The bugs}
+
+The following mistakes occur:
 \begin{enumerate}
 \setlength{\labelsep}{5pt}
-\item
-On the page 1: ``\numspell{123}''\\
+\item On the page 1: ``\numspell{123}''\\
 Required: \numspell*{123}\MakeUppercase{``\thenumspell''}
-
-\item
-On the heading: \emph{``THE \ordnumspell{123} FACTOR''}\\
+\item On the heading: \emph{``THE \ordnumspell{123} FACTOR''}\\
 Required: \ordnumspell*{123}\MakeUppercase{\em``The \thenumspell\ factor''}
-
-\item
-On the pdf bookmark: ``The 123 factor''\\
+\item On the pdf bookmark: ``The 123 factor''\\
 Required: ``The \ordnumspell{123} factor''
 \end{enumerate}
-\noindent
-\textbf{The solution}
+
+\subsubsection*{The solution}
+
 \begin{examplelst}
 \documentclass{article}
 \usepackage{hyperref}
-- 
cgit v1.2.3

