Hello, I have just noticed this thread (I cannot really catch up reading all the stuff here) and remembered that I have some really old files lying somewhere on my computer. The file dates back to the time when Brooks Moses & Hans have implemented \defineconversion [sl] [a] [\sloveniancharacters] for me, so I needed to make sure that I understood the concept. I didn't review the content, I have just added a small demo at the end. On 4/16/07, Robin Kirkham wrote:
Hi all,
There are still a few problems with \numstr when you get beyond the hundreds. Perhaps this is unlikely when it is a page number, but I was interested in using this macro for contracts, where an amount of money is often written out in words.
\input numstr.tex \starttext \numstr{-1}\par \numstr{0}\par \numstr{101}\par \numstr{1001}\par \numstr{1000001}\par \numstr{1200021} \stoptext
This produces output:
null null one hundred and one one thousand one one millionone one million two hundred thousand twenty-one
I didn't follow the thread, but the problems might result from the fact that it was translated from a german counter rather than written from scratch following some rules.
which should be:
minus one zero one hundred and one one thousand and one one million and one
My example fails on this one, but I guess that it could be fixed if you tell me the rule to distinguish the two cases.
one million, two hundred thousand and twenty-one
In English, the tens/units (if not zero) should be preceded by "and" if the number exceeds 100 (so 101 is correct in the above output). This applies whether the tens/units is truly tens/units, or is a thousands or millions multiplier (120000 = "one hundred and twenty thousand").
The use of a comma after millions and sometimes thousands is helpful but not essential, and it only appears in certain cases. I'll have to think a bit more about a rule for that!
The use of a hyphen between tens and units ("twenty-one") is not incorrect but is nowadays probably regarded as a little old-fashioned (but personally, I like it).
Best,
Robin
I have used this page as a source: http://www.ego4u.com/en/cram-up/vocabulary/numbers/cardinal Mojca Note 1: If the functionality/documentation can be polished out nicely, the core or m-something might be a better place for such a module than third-party modules. But I guess that Hans would want to split this into *.mkii and *.mkiv anyway, so I would probably need to write the lua implementation for it before asking for inclusion ;) Note 2: there are some switches which would need to be implemented in a higher level user interface. Note that the German counter might be useless since I have never finished it.