-1

The alternative is to use Roman numerals, for which a package is available. I am using the LaTeX catchfile package and the \input{} command to associate a title in a set of TITLE files with \section{} commands in a set of DOCUMENT files.

I would like to have a file of catchfile definitions, with records such as:

\CatchFileDef{\t-001}{title-001.tex}{}

\CatchFileDef{\t-002}{title-002.tex}{}

\CatchFileDef{\t-003}{title-003.tex}{}

But LaTeX does not allow numerical labels such as "\title-003".

Roman numerals are workable:

\CatchFileDef{\ti}{title-001.tex}{}

\CatchFileDef{\tii}{title-002.tex}{}

\CatchFileDef{\tiii}{title-003.tex}{}

but are ugly in comparison with:

\CatchFileDef{\tzerozeroone}{title-001.tex}{}

\CatchFileDef{\tzerozerotwo}{title-002.tex}{}

\CatchFileDef{\tzerozerothree}{title-003.tex}{}
russ
  • 1
  • 1

2 Answers2

1

On possibility to convert digits into their corresponding words is the numspell package:

\documentclass{article}

\usepackage{numspell}
\usepackage{pgffor}

\begin{document}

\foreach \x in {0,...,9}{
\foreach \y in {0,...,9}{
\foreach \z in {0,...,9}{

\x\y\z : \numspell{\x}\numspell{\y}\numspell{\z}

}}}

\end{document}

enter image description here

  • If only I could run three instances of numspell in parallel! I envision a one-time effort to generate a look-up table of, say, a thousand entries, Perhaps manual editing would be most economical. After all, the range of numbers is only zero to nine. – russ Dec 04 '21 at 16:57
  • @russ what's stopping you from call numspell multiple times? – samcarter_is_at_topanswers.xyz Dec 06 '21 at 19:43
  • I did not see just how to do it. I envisioned a list with items <\zerozeroone> to <\nineninenine>; catchfile uses the list to associate document files with files to . A couple of hours editing with Emacs seemed to me to be the most simple solution. At least now when I am working on file 684, it is easy to remember the key, which is <\sixeightfour>; in Roman that is , except on my wall clock <4> is rather than . – russ Dec 07 '21 at 22:52
  • @russ so nest 3 loops from 0 to 9? – samcarter_is_at_topanswers.xyz Dec 07 '21 at 23:49
  • Yes. I know how to use Emacs to produce a series of Arabic numbers, so cut and paste was needed only for the English spellings zero, one, two, three, ... , nine. Actually I did only three hundred, but it would be nice to learn how to automate the process. – russ Dec 09 '21 at 02:14
-1

In an hour or two, using Emacs, I created a look up table which solved the problem. The English spelling of Arabic numerals appears to be less prone to error than is the use of Roman numerals.

russ
  • 1
  • 1