Thanks Wolfgang, it's perfect.

On Tue, Apr 1, 2008 at 5:04 PM, Wolfgang Schuster <
[EMAIL PROTECTED]> wrote:

> On Tue, Apr 1, 2008 at 10:49 AM, Wolfgang Schuster
> <[EMAIL PROTECTED]> wrote:
> > On Tue, Apr 1, 2008 at 9:56 AM, Zhichu Chen <[EMAIL PROTECTED]>
> 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.
>
> A slightly modified version.
>
> You could now also use counter values.
>
> \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}
>
> \def\zhnumber#1%
>  {\expandafter\dozhnumber#1\endzhnumber}
>
> \def\endzhnumber{\endzhnumber}
>
> \def\dozhnumber
>  {\futurelet\next\dodozhnumber}
>
> \def\dodozhnumber
>  {\ifx\next\endzhnumber
>     \let\next\gobbleoneargument
>  \else
>    \def\next##1{\dododozhnumber{##1}\dozhnumber}%
>  \fi\next}
>
> \starttext
> \zhnumber{01234}
>
> \zhnumber{\number\pageno}
> \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
>
> ___________________________________________________________________________________
>



-- 
Best Regards
Chen
----------------------------------------------------------------

Zhi-chu Chen | Shanghai Synchrotron Radiation Facility
No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China
tel: 086 21 5955 3405 | zhichu.chen.googlepages.com
| www.sinap.ac.cn
----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to