ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* page numbering in words?
@ 2007-03-26 16:39 cormullion
  2007-03-26 18:16 ` Wolfgang Schuster
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: cormullion @ 2007-03-26 16:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

is it possible to adjust options so as to get page numbering done in  
words? Eg

"one" "two" ..... "eighty-nine" ... "three hundred and sixty seven" ?

Or does this require some more work/code?

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: page numbering in words?
@ 2007-04-16 12:52 Robin Kirkham
  0 siblings, 0 replies; 14+ messages in thread
From: Robin Kirkham @ 2007-04-16 12:52 UTC (permalink / raw)
  To: ntg-context

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

which should be:

minus one
zero
one hundred and one
one thousand and one
one million and one
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

> Date: 2007-03-29 17:38 +1000
> To: mailing list for ConTeXt users
> Subject: Re: [NTG-context] page numbering in words?
> cormullion.at.remove.this.mac.com wrote:
> > On 2007-03-28, at 16:49.0, Zhichu Chen wrote:
> >
> >> I modified Wolfgang's macro as the attached file. But I'm really
> >> not a native American, so there must be some special rules that
> >> I've ignored. Wish you good luck.
> >
> > Yes - this works great now. Thank you for sorting out the TeX code,
> > which is like no other language I know ;-). I've changed only one
> > spelling (fourty -> forty) and the rest looks perfect.
>
> It would be nice if someone (one of the module tutorial attendants :-)
> could wrap this command in a module for the contextgarden page.
>
> Cheers,
> Taco
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2007-04-17 11:09 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-26 16:39 page numbering in words? cormullion
2007-03-26 18:16 ` Wolfgang Schuster
2007-03-26 18:44   ` cormullion
2007-03-26 18:40 ` Wolfgang Schuster
2007-03-26 21:31   ` cormullion
2007-03-28 11:03 ` cormullion
2007-03-28 11:59   ` Zhichu Chen
2007-03-28 12:09   ` Wolfgang Schuster
2007-03-28 15:09     ` cormullion
2007-03-28 15:49       ` Zhichu Chen
2007-03-28 22:15         ` cormullion
2007-03-29  7:39           ` Taco Hoekwater
2007-04-17 11:09             ` Mojca Miklavec
2007-04-16 12:52 Robin Kirkham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).