[metapost] labels

Roger Mason rmason at esd.mun.ca
Thu Feb 3 15:16:36 CET 2005


Hello,

I have the following code snippet in a Metapost source file:

for i = 0 upto 17:
  draw (i*tic,0) -- (i*tic,-0.3u);
endfor;

for i = 0 step 2 until 17 :
  label.bot(LATEX("$10^i$"), (i*tic,-0.4u) );
endfor;

The intent is to generate tics labeled 10^0, 10^2 etc.  Instead the
loop counter is inserted into the label unexpanded.  Is there a way to
accomplish this without resorting to a long list of label.*
statements?

Thanks,

Roger Mason



More information about the metapost mailing list