Thanks Wolfgang, it's perfect.
On Tue, Apr 1, 2008 at 10:49 AM, Wolfgang Schuster
<schuster.wolfgang@googlemail.com> wrote:
> On Tue, Apr 1, 2008 at 9:56 AM, Zhichu Chen <zhichu.chen@gmail.com> wrote:A slightly modified version.
> > 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.
You could now also use counter values.
\def\zhnumber#1%
\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}
{\expandafter\dozhnumber#1\endzhnumber}
\let\next\gobbleoneargument
\def\endzhnumber{\endzhnumber}
\def\dozhnumber
{\futurelet\next\dodozhnumber}
\def\dodozhnumber
{\ifx\next\endzhnumber
\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
___________________________________________________________________________________