From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/59890 Path: news.gmane.org!not-for-mail From: "Tom" Newsgroups: gmane.comp.tex.context Subject: Re: Converting numerals to text Date: Sun, 27 Jun 2010 19:48:26 -0400 Message-ID: <00ae01cb1653$3c922b20$b5b68160$@com> References: <008101cb156e$89d93350$9d8b99f0$@com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1277682521 26897 80.91.229.12 (27 Jun 2010 23:48:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 27 Jun 2010 23:48:41 +0000 (UTC) To: "'mailing list for ConTeXt users'" Original-X-From: ntg-context-bounces@ntg.nl Mon Jun 28 01:48:39 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OT1aX-0003Bl-2r for gctc-ntg-context-518@m.gmane.org; Mon, 28 Jun 2010 01:48:37 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D8F51C9B1A; Mon, 28 Jun 2010 01:48:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id r5gjOaJyeCmF; Mon, 28 Jun 2010 01:48:33 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 34E49C9AFD; Mon, 28 Jun 2010 01:48:33 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 51E9AC9AFD for ; Mon, 28 Jun 2010 01:48:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 7BLDMsG-KpJQ for ; Mon, 28 Jun 2010 01:48:28 +0200 (CEST) Original-Received: from smtp2.ctinetworks.com (smtp2.ctinetworks.com [205.166.61.227]) by balder.ntg.nl (Postfix) with ESMTP id 4DB82C9AF5 for ; Mon, 28 Jun 2010 01:48:28 +0200 (CEST) Original-Received: from TomPC (dsl-206-251-12-162.dsl0.crls.pa.net [206.251.12.162]) by smtp2.ctinetworks.com (Postfix) with ESMTP id B30B91A73F7 for ; Sun, 27 Jun 2010 19:48:24 -0400 (EDT) In-Reply-To: X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcsVhCFgWtTiTlldRb6FoS106UNdagAzGsMA Content-Language: en-us X-ctinetworks-Information: Please contact the ISP for more information X-ctinetworks-MailScanner-ID: B30B91A73F7.E4220 X-ctinetworks-VirusCheck: Found to be clean X-ctinetworks-SpamCheck: X-ctinetworks-Watermark: 1278546507.13047@Fi6uCqZ+ak9cDhotCq5zmA X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:59890 Archived-At: 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 ___________________________________________________________________________________