Expansion again?

1 view
Skip to first unread message

Mojca Miklavec

unread,
Aug 23, 2006, 9:10:11 PM8/23/06
to gnuplot...@googlegroups.com
Hello,

I simply don't get it. The more examples I see, the less clue I have
about (un)expansion. Well, I'm not sure if this one is connected with
it as well, but I'm stummied again.

\defineconversion[abc][a,b,c,d]

\def\tn{2}
\startMPextensions
tn := \tn;
\stopMPextensions

\startTeXtexts
\doloop{\doifelseconversionnumber{abc}{\recurselevel}
{\TeXtext{\numexpr\recurselevel\relax}{{\convertnumber{abc}{\recurselevel}}}}
{\startMPextensions % this is never seen by metapost
tn := \recurselevel;
\stopMPextensions
\exitloop}}
\stopTeXtexts

\starttext

\startMPcode
draw sometxt(tn-1);
\stopMPcode

\stoptext


Metapost needs to know the number of symbols, so that it can calculate
the proper symbol modulo that number.

Thanks for any hints,
Mojca

Reply all
Reply to author
Forward
0 new messages