* Converting numerals to text
@ 2010-06-26 20:31 Tom
2010-06-26 23:05 ` Mojca Miklavec
0 siblings, 1 reply; 5+ messages in thread
From: Tom @ 2010-06-26 20:31 UTC (permalink / raw)
To: ntg-context
Is there a command or macro that converts a numeral to its English language
equivalent? For example, I would like to display Thirteen for 13.
Tom Benjey
717-258-9733 voice
717-243-0074 fax
Twitter: @TomBenjey
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Converting numerals to text
2010-06-26 20:31 Converting numerals to text Tom
@ 2010-06-26 23:05 ` Mojca Miklavec
2010-06-27 23:48 ` Tom
0 siblings, 1 reply; 5+ messages in thread
From: Mojca Miklavec @ 2010-06-26 23:05 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sat, Jun 26, 2010 at 22:31, Tom wrote:
> Is there a command or macro that converts a numeral to its English language
> equivalent? For example, I would like to display Thirteen for 13.
http://wiki.contextgarden.net/Page_numbering_in_words
http://thread.gmane.org/gmane.comp.tex.context/33962/focus=34304
(there is an attachment t-counting.tex in that thread)
Mojca
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Converting numerals to text
2010-06-26 23:05 ` Mojca Miklavec
@ 2010-06-27 23:48 ` Tom
2010-06-28 2:31 ` Aditya Mahajan
0 siblings, 1 reply; 5+ messages in thread
From: Tom @ 2010-06-27 23:48 UTC (permalink / raw)
To: 'mailing list for ConTeXt users'
On Sat, Jun 26, 2010 at 22:31, Tom wrote:
> Is there a command or macro that converts a numeral to its English
language
> equivalent? For example, I would like to display Thirteen for 13.
http://wiki.contextgarden.net/Page_numbering_in_words
http://thread.gmane.org/gmane.comp.tex.context/33962/focus=34304
(there is an attachment t-counting.tex in that thread)
Mojca
The wiki includes the code for a macro, \numstr, that can be used to create
lower-case chapter numbers, but when I try to capitalize the first word, get
error messages. For example, the following errors out:
Chapter \Word{\numstr{23}}
As does
Chapter \Words{\numstr{23}}
but
Chapter \numstr{23}
Works as does
Chapter \Words{twenty-three}
However, the former returns twenty-three (all lower case)
and the latter returns Twenty-three (only the first part is in upper case)
It's not clear from the Chicago Manual of Style if three should be
capitalized in this instance but, to my eye, it doesn't look right. Is there
a way to convert chapter numbers to text and select the desired
capitalization?
Tom Benjey
717-258-9733 voice
717-243-0074 fax
Twitter: @TomBenjey
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Converting numerals to text
2010-06-27 23:48 ` Tom
@ 2010-06-28 2:31 ` Aditya Mahajan
2010-06-28 3:22 ` Tom
0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2010-06-28 2:31 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sun, 27 Jun 2010, Tom wrote:
> On Sat, Jun 26, 2010 at 22:31, Tom wrote:
>> Is there a command or macro that converts a numeral to its English
> language
>> equivalent? For example, I would like to display Thirteen for 13.
>
> http://wiki.contextgarden.net/Page_numbering_in_words
>
> http://thread.gmane.org/gmane.comp.tex.context/33962/focus=34304
> (there is an attachment t-counting.tex in that thread)
>
> Mojca
>
>
> The wiki includes the code for a macro, \numstr, that can be used to create
> lower-case chapter numbers, but when I try to capitalize the first word, get
> error messages. For example, the following errors out:
>
> Chapter \Word{\numstr{23}}
>
> As does
>
> Chapter \Words{\numstr{23}}
>
> but
>
> Chapter \numstr{23}
>
> Works as does
>
> Chapter \Words{twenty-three}
>
> However, the former returns twenty-three (all lower case)
> and the latter returns Twenty-three (only the first part is in upper case)
>
> It's not clear from the Chicago Manual of Style if three should be
> capitalized in this instance but, to my eye, it doesn't look right. Is there
> a way to convert chapter numbers to text and select the desired
> capitalization?
If you want every word to be capitalized, simply change one, two, three,
etc in the source of \numstr to One, Two, Three.
Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Converting numerals to text
2010-06-28 2:31 ` Aditya Mahajan
@ 2010-06-28 3:22 ` Tom
0 siblings, 0 replies; 5+ messages in thread
From: Tom @ 2010-06-28 3:22 UTC (permalink / raw)
To: 'mailing list for ConTeXt users'
On Sun, 27 Jun 2010, Tom wrote:
> On Sat, Jun 26, 2010 at 22:31, Tom wrote:
>> Is there a command or macro that converts a numeral to its English
> language
>> equivalent? For example, I would like to display Thirteen for 13.
>
> http://wiki.contextgarden.net/Page_numbering_in_words
>
> http://thread.gmane.org/gmane.comp.tex.context/33962/focus=34304
> (there is an attachment t-counting.tex in that thread)
>
> Mojca
>
>
> The wiki includes the code for a macro, \numstr, that can be used to
create
> lower-case chapter numbers, but when I try to capitalize the first word,
get
> error messages. For example, the following errors out:
>
> Chapter \Word{\numstr{23}}
>
> As does
>
> Chapter \Words{\numstr{23}}
>
> but
>
> Chapter \numstr{23}
>
> Works as does
>
> Chapter \Words{twenty-three}
>
> However, the former returns twenty-three (all lower case)
> and the latter returns Twenty-three (only the first part is in upper case)
>
> It's not clear from the Chicago Manual of Style if three should be
> capitalized in this instance but, to my eye, it doesn't look right. Is
there
> a way to convert chapter numbers to text and select the desired
> capitalization?
If you want every word to be capitalized, simply change one, two, three,
etc in the source of \numstr to One, Two, Three.
Aditya
If I do that, they will always be in upper case. I would lose the option of
having them in lower case.
Tom Benjey
717-258-9733 voice
717-243-0074 fax
Twitter: @TomBenjey
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-06-28 3:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-26 20:31 Converting numerals to text Tom
2010-06-26 23:05 ` Mojca Miklavec
2010-06-27 23:48 ` Tom
2010-06-28 2:31 ` Aditya Mahajan
2010-06-28 3:22 ` Tom
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).