![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
13 Oct
2011
13 Oct
'11
5:26 a.m.
Am 25.09.2011 um 02:43 schrieb Aditya Mahajan:
I am writing a module which uses metapost in the background for drawing. I wanted to create an interface for setting the style and color of metapost labels but using \doset...attributes is not working.
Here is an example:
\definenamespace [test] [style=yes, name=test, command=yes, setup=yes]
\definetest [blue] [color=blue, text=Blue]
\definetest [two] [blue] [style=\bold, text=Two]
\starttext \edef\currenttest{two} \startMPdrawing label.lft(\sometxt{\dosettestattributes{style}{color} \testparameter{text}}, (0,0)) ;
You can use the old \doattributes command which is expandable. label.lft(\sometxt{\doattributes{\currenttesthash}{style}{color}{\testparameter{text}}},(0,0)) ; Wolfgang