[metapost] labels in for loops?

Martin Kaffanke technik at roomandspace.com
Thu Nov 15 11:19:41 CET 2007


Hi there!

I have the following:

   u := 7mm;
   linecap:=squared;
   pickup pencircle scaled .3mm;
   draw (0,0)--(0,10u);
   draw (.2mm,0)--(.2mm,10u);
   linecap:=rounded;
   pickup pencircle scaled .3mm;
   for i=0 upto 10:
      draw (0,i*u)--(.5u, i*u);
      label.rt(i/10, (.5u, i*u));
      if i < 10:
         for j=1 upto 3:
            draw (0,i*u+j*u/4)--(.3u,i*u+j*u/4);
         endfor;
      fi;
   endfor;

But this gives the error 

Diplomarbeit.mp:60:Not implemented: (known numeric)infont(string).
endfor
Diplomarbeit.mp:60:Emergency stop. endfor

It the line label.rt(i/10, (.5u, i*u)); but how do I have to write that
correctly?

Thanks,
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://tug.org/pipermail/metapost/attachments/20071115/b881e3c6/attachment.bin 


More information about the metapost mailing list