[metapost] Variables inside btex etex

Maurício CA mauricio.antunes at gmail.com
Tue Feb 1 20:58:51 CET 2011


Hi, all,

I'm tring to use TeX to typeset labels for points x1 to x10. I've
just realized my naive approach doesn't work:

    for i = 1 step 1 until 10:
        pair p;
        p := ((i-1)/9)[(0,h),(0,0)];
        label(btex "$x_" & decimal(i) & "$" etex, p);
    endfor;

Is it possible to do that?

Thanks,
Maurício




More information about the metapost mailing list