[metapost] accessing letters in picture (for...within loop)

Taco Hoekwater taco at elvenkind.com
Tue Nov 21 11:41:57 CET 2006



Hi,

Stephan Hennig wrote:
> want to access the coordinates of single letters.  Is there any way to
> tell MetaPost to process pictures letter by letter?

With a "Thank you!" to Hans for a behind-the-scenes answer:

   string s;
   for i=0 upto length(t)-1:
     s := substring(i,i+1) of t ;
     show s;
   endfor;

Greetings, Taco


More information about the metapost mailing list