From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/39774 Path: news.gmane.org!not-for-mail From: "Wolfgang Schuster" Newsgroups: gmane.comp.tex.context Subject: Re: Converting counters? Date: Tue, 1 Apr 2008 10:49:30 +0200 Message-ID: <115224fb0804010149g2820114bja3cd53dd90181039@mail.gmail.com> References: <769ba7780804010018n1f4ad1a7kf0c20195877f872a@mail.gmail.com> <115224fb0804010041s17d4da00t3564f57209abf8ee@mail.gmail.com> <769ba7780804010056n370caa3ele529f95cf5711771@mail.gmail.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: ger.gmane.org 1207039868 23024 80.91.229.12 (1 Apr 2008 08:51:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Apr 2008 08:51:08 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 01 10:51:40 2008 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1JgcDT-0005fg-OY for gctc-ntg-context-518@m.gmane.org; Tue, 01 Apr 2008 10:51:39 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CE8A21FCCA; Tue, 1 Apr 2008 10:51:01 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12471-02-3; Tue, 1 Apr 2008 10:50:14 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 256121FC7C; Tue, 1 Apr 2008 10:50:14 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2C02C1FC7C for ; Tue, 1 Apr 2008 10:50:11 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12323-02-3 for ; Tue, 1 Apr 2008 10:49:33 +0200 (CEST) Original-Received: from yw-out-1718.google.com (yw-out-1718.google.com [74.125.46.157]) by ronja.ntg.nl (Postfix) with ESMTP id 34D6F1FBFB for ; Tue, 1 Apr 2008 10:49:31 +0200 (CEST) Original-Received: by yw-out-1718.google.com with SMTP id 6so298409ywa.74 for ; Tue, 01 Apr 2008 01:49:30 -0700 (PDT) Original-Received: by 10.151.99.3 with SMTP id b3mr3954862ybm.179.1207039770807; Tue, 01 Apr 2008 01:49:30 -0700 (PDT) Original-Received: by 10.150.49.21 with HTTP; Tue, 1 Apr 2008 01:49:30 -0700 (PDT) In-Reply-To: <769ba7780804010056n370caa3ele529f95cf5711771@mail.gmail.com> Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:39774 Archived-At: On Tue, Apr 1, 2008 at 9:56 AM, Zhichu Chen wrote: > Yes, only I don't need that complex. I mean \chinesenumber{123} will give > "one hundred and twenty-three" but all I want is "one two three." Besides, > I don't like to copy such long codes since I really don't want to load > font-chi.tex > which gives weird spacing problems while typesetting Chinese along with > English. Anyway, I'd love to learn something rather than to use something. > > Thanks. \def\dododozhnumber#1% {\ifcase#1 a\or b\or c\or d\or e\or f\or g\or i\or h\or i\fi \dozhnumber} \def\zhnumber#1% {\dozhnumber#1\endzhnumber} \def\endzhnumber{\endzhnumber} \def\dozhnumber {\futurelet\next\dodozhnumber} \def\dodozhnumber {\ifx\next\endzhnumber \expandafter\gobbleoneargument \else \expandafter\dododozhnumber \fi} \starttext \zhnumber{123} \stoptext Wolfgang ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________