ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Tom" <Tom@tuxedo-press.com>
To: "'mailing list for ConTeXt users'" <ntg-context@ntg.nl>
Subject: Re: Converting numerals to text
Date: Sun, 27 Jun 2010 19:48:26 -0400	[thread overview]
Message-ID: <00ae01cb1653$3c922b20$b5b68160$@com> (raw)
In-Reply-To: <AANLkTim3hxIy0NsyaC5YGccR9Qs3Kg3pqr46TDmZCRz_@mail.gmail.com>

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
___________________________________________________________________________________


  reply	other threads:[~2010-06-27 23:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-26 20:31 Tom
2010-06-26 23:05 ` Mojca Miklavec
2010-06-27 23:48   ` Tom [this message]
2010-06-28  2:31     ` Aditya Mahajan
2010-06-28  3:22       ` Tom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='00ae01cb1653$3c922b20$b5b68160$@com' \
    --to=tom@tuxedo-press.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).