summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/numspell/numspell.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-11-08 03:01:18 +0000
committerNorbert Preining <norbert@preining.info>2020-11-08 03:01:18 +0000
commit3021c3d95971e522d22cf5c8aba3410a06d8a84f (patch)
tree7bcb93367c78559d6fe479d8be43461b048c39bf /macros/latex/contrib/numspell/numspell.tex
parentec3426946c37f270d71e8c4ad19d37beea726e7d (diff)
CTAN sync 202011080301
Diffstat (limited to 'macros/latex/contrib/numspell/numspell.tex')
-rw-r--r--macros/latex/contrib/numspell/numspell.tex145
1 files changed, 36 insertions, 109 deletions
diff --git a/macros/latex/contrib/numspell/numspell.tex b/macros/latex/contrib/numspell/numspell.tex
index 5c8186fe48..c28766044d 100644
--- a/macros/latex/contrib/numspell/numspell.tex
+++ b/macros/latex/contrib/numspell/numspell.tex
@@ -1,7 +1,7 @@
%%
%% `numspell.tex' documentation of the numspell package
%%
-%% Copyright 2017- by Tibor Tomacs
+%% Copyright 2017-2020 by Tibor Tomacs
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -16,7 +16,7 @@
%% The Current Maintainer of this work is Tibor Tomacs.
%%
\documentclass{article}
-\usepackage[a4paper,margin=25mm]{geometry}
+\usepackage[a4paper]{geometry}
\usepackage[pdfstartview=FitH,colorlinks,allcolors=black,bookmarksnumbered]{hyperref}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
@@ -52,7 +52,7 @@ keepspaces]}
\begin{document}
-\title{The {\bfseries\sffamily numspell} package\\{\large v1.2 (2017/09/30)}}
+\title{The {\bfseries\sffamily numspell} package\\{\large v1.3 (2020/11/07)}}
\author{Tibor Tómács\\{\normalsize\url{tomacs.tibor@uni-eszterhazy.hu}}}
\date{}
\maketitle
@@ -60,10 +60,10 @@ keepspaces]}
\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).
-Currently, the supported languages are English, French, German, Hungarian and Italian.
+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{pdftexcmds}.
+The \texttt{numspell} package requires the services of the following packages: \texttt{xstring}, \texttt{etoolbox}, \texttt{iflang}.
Load the package as usual, with
\begin{flushleft}
@@ -231,25 +231,6 @@ For example
\thenumspellMyNum
\end{description}
-\section{Commands for English language}
-\begin{description}
-\item\commandinline|\numspellUS|\\
-By default, the number spelling will happen in British English, if the \texttt{english} language is active.
-This command changes it to American English. For example
-\begin{flushleft}
-\verb|\numspellUS\numspell{1012345}| $\to$ \numspellUS\numspell{1012345}\numspellGB
-\end{flushleft}
-
-\item\commandinline|\numspellGB|\\
-Using the \verb|\numspellUS| command, you can rechange it to British English by this command. For example
-\begin{verbatim}
-\numspellUS\numspell{1012345}\\
-\numspellGB\numspell{1012345}
-\end{verbatim}
-\numspellUS\numspell{1012345}\\
-\numspellGB\numspell{1012345}
-\end{description}
-
\section{Commands for French language}
The following commands only work, if \texttt{french} language is active.
\begin{description}
@@ -298,34 +279,10 @@ For example
\thenumspellMyNum}
\item\commandinline|\Anumspell[!<zeros>!]{!<num>!}|\\
-It works like \verb|\anumspell|, but the first letter will be capital. For example
-\begin{flushleft}
-{\selectlanguage{magyar}
-\verb|\Anumspell{1}| $\to$ \Anumspell{1}\\
-\verb|\Anumspell{2}| $\to$ \Anumspell{2}}
-\end{flushleft}
+It works like \verb|\anumspell|, but the first letter will be capital.
\item\commandinline|\Anumspell*[!<zeros>!]{!<num>!}|\\
-It works like \verb|\Anumspell|, but the number spelling will not be printed.
-In other words, the following two lines are equivalent:
-\begin{flushleft}
-\verbinline|\Anumspell[!<zeros>!]{!<num>!}|\\
-\verbinline|\Anumspell*[!<zeros>!]{!<num>!}\thenumspell|
-\end{flushleft}
-For example
-\begin{verbatim}
-\Anumspell*{1}
-\numspellsave{MyNum}
-\Anumspell*{2}
-\thenumspell;
-\thenumspellMyNum
-\end{verbatim}
-{\selectlanguage{magyar}
-\Anumspell*{1}
-\numspellsave{MyNum}
-\Anumspell*{2}
-\thenumspell;
-\thenumspellMyNum}
+It works like \verb|\anumspell*|, but the first letter will be capital.
\item\commandinline|\aordnumspell[!<zeros>!]{!<num>!}|\\
It works like \verb|\ordnumspell|, but the number spelling will start with Hungarian definite article. For example
@@ -358,34 +315,10 @@ For example
\thenumspellMyNum}
\item\commandinline|\Aordnumspell[!<zeros>!]{!<num>!}|\\
-It works like \verb|\aordnumspell|, but the first letter will be capital. For example
-\begin{flushleft}
-{\selectlanguage{magyar}
-\verb|\Aordnumspell{1}| $\to$ \Aordnumspell{1}\\
-\verb|\Aordnumspell{2}| $\to$ \Aordnumspell{2}}
-\end{flushleft}
+It works like \verb|\aordnumspell|, but the first letter will be capital.
\item\commandinline|\Aordnumspell*[!<zeros>!]{!<num>!}|\\
-It works like \verb|\Aordnumspell|, but the number spelling will not be printed.
-In other words, the following two lines are equivalent:
-\begin{flushleft}
-\verbinline|\Aordnumspell[!<zeros>!]{!<num>!}|\\
-\verbinline|\Aordnumspell*[!<zeros>!]{!<num>!}\thenumspell|
-\end{flushleft}
-For example
-\begin{verbatim}
-\Aordnumspell*{1}
-\numspellsave{MyNum}
-\Aordnumspell*{2}
-\thenumspell;
-\thenumspellMyNum
-\end{verbatim}
-{\selectlanguage{magyar}
-\Aordnumspell*{1}
-\numspellsave{MyNum}
-\Aordnumspell*{2}
-\thenumspell;
-\thenumspellMyNum}
+It works like \verb|\aordnumspell*|, but the first letter will be capital.
\end{description}
\section{Commands for Italian language}
@@ -413,44 +346,37 @@ The ordinal numbers will be printed in feminine form. For example\\
\usepackage{numspell}
\usepackage[group-separator={,}]{siunitx}
\begin{document}
-
\def\mynum{123456789}
-
\noindent
-In American English the spelling of \num{\mynum} is
-{\numspellUS\emph{``\numspell{\mynum}''}}.
-
-\smallskip\noindent
In British English the spelling of \num{\mynum} is
\emph{``\numspell{\mynum}''}.
-
-\smallskip\noindent
+\par\smallskip\noindent
+In American English the spelling of \num{\mynum} is
+{\selectlanguage{american}\emph{``\numspell{\mynum}''}}.
+\par\smallskip\noindent
In French the spelling of \num{\mynum} is
{\selectlanguage{french}\emph{``\numspell{\mynum}''}}.
-
-\smallskip\noindent
+\par\smallskip\noindent
In German the spelling of \num{\mynum} is
{\selectlanguage{ngerman}\emph{``\numspell{\mynum}''}}.
-
-\smallskip\noindent
+\par\smallskip\noindent
In Hungarian the spelling of \num{\mynum} is
{\selectlanguage{magyar}\emph{`'\numspell{\mynum}''}}.
-
-\smallskip\noindent
+\par\smallskip\noindent
In Italian the spelling of \num{\mynum} is
{\selectlanguage{italian}\emph{``\numspell{\mynum}''}}.
-
\end{document}
\end{examplelst}
\def\mynum{123456789}
\noindent
-In American English the spelling of \num{\mynum} is
-{\numspellUS\emph{``\numspell{\mynum}''}}.
+In British English the spelling of \num{\mynum} is
+\emph{``\numspell{\mynum}''}.
\smallskip\noindent
-In British English the spelling of \num{\mynum} is \emph{``\numspell{\mynum}''}.
+In American English the spelling of \num{\mynum} is
+{\selectlanguage{american}\emph{``\numspell{\mynum}''}}.
\smallskip\noindent
In French the spelling of \num{\mynum} is
@@ -475,10 +401,8 @@ In Italian the spelling of \num{\mynum} is
\usepackage{numspell}
\usepackage[group-separator={,}]{siunitx}
\begin{document}
-
\def\mynum{123456789012345678901234567890123456789012345678901234567890123456}
\Numspell{\mynum}, that is \num{\mynum}.
-
\end{document}
\end{examplelst}
@@ -493,11 +417,9 @@ In Italian the spelling of \num{\mynum} is
\newcounter{mycount}
\makeatletter
\begin{document}
-
The
\@whilenum\value{mycount}<51
\do{\ordnumspell{\themycount}\stepcounter{mycount},\ }\dots
-
\end{document}
\end{examplelst}
@@ -517,11 +439,9 @@ The
\def\themycount{\numspell{\arabic{mycount}}}
\makeatletter
\begin{document}
-
\Numspell{0},
\@whilenum\value{mycount}<30
\do{\stepcounter{mycount}\themycount,\ }\dots
-
\end{document}
\end{examplelst}
@@ -535,44 +455,51 @@ The
\bigskip
\section{Limitations}
-Do not use the \verb|\numspell|, \verb|\numspell*|, \verb|\Numspell|, \verb|\Numspell*|, etc.\ commands inside \verb|\MakeUppercase| and sectioning commands.
+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:
\begin{examplelst}
\documentclass{article}
-\usepackage{hyperref,numspell}
+\usepackage{hyperref}
+\usepackage{numspell}
\pagestyle{headings}
\begin{document}
-
\section{The \ordnumspell{123} factor}
\MakeUppercase{\numspell{123}}
\newpage
Text
-
\end{document}
\end{examplelst}
\noindent
-The bugs:
+\textbf{The bugs}
\begin{enumerate}
\setlength{\labelsep}{5pt}
\item
-You can see it on the page 1: ``\numspell{123}''\\
+On the page 1: ``\numspell{123}''\\
Required: \numspell*{123}\MakeUppercase{``\thenumspell''}
\item
-You can see it on the heading: \emph{``THE \ordnumspell{123} FACTOR''}\\
+On the heading: \emph{``THE \ordnumspell{123} FACTOR''}\\
Required: \ordnumspell*{123}\MakeUppercase{\em``The \thenumspell\ factor''}
\item
-You can see it on the pdf bookmark: ``The 123 factor''\\
+On the pdf bookmark: ``The 123 factor''\\
Required: ``The \ordnumspell{123} factor''
\end{enumerate}
\noindent
-The solution is very easy:
+\textbf{The solution}
\begin{examplelst}
+\documentclass{article}
+\usepackage{hyperref}
+\usepackage{numspell}
+\pagestyle{headings}
+\begin{document}
\ordnumspell*{123}
\section{The \thenumspell\ factor}
\numspell*{123}
\MakeUppercase{\thenumspell}
+\newpage
+Text
+\end{document}
\end{examplelst}
\end{document} \ No newline at end of file