[metapost] Processing comma separated values

Aditya Mahajan adityam at umich.edu
Wed Feb 24 21:25:07 CET 2010


Hi,

What is the canonical way of processing a list of comma separated values 
in metapost. I want to write a helper macro for the boxes package so that

boxsep(a,b,c) = p ;

expands to

b.w - a.e = c.w - b.e = p ;

and

boxsep(a,b,c,d) = p ;

expands to

b.w - a.e = c.w - b.e = d.w - c.e = p ;

and so on. Any hints on how to write such a macro.

Thanks,
Aditya



More information about the metapost mailing list