[metapost] Automatic labeling

Peng Yu pengyu.ut at gmail.com
Tue Nov 14 17:48:11 CET 2006


Suppose I have 100 vertexes, I want to label all of them with the vertex index.

I'm wondering if it is possible to do it with a for loop in metapost.

pair v[];
v1 := ...;
v2 := ...
v100 = ...;

label(btex $1$ etex, v1);
label(btex $2$ etex, v2);
label(btex $100$ etex, v100);


More information about the metapost mailing list