![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
Hi, There are certain things that I do not like about metapost (it is not possible to specify drawoptions and filloptions separately, it lacks some of the features of tikz, etc.) and I was playing around trying to implement them. Being used to the ConTeXt way of things, I wanted to write macros in metapost the same way (define.... setup.... etc.) This is my first attempt --- a replacement for dashpattern macro. delimiters [[ ]] ; def definedash suffix @# = dodefinedash.@# enddef ; vardef dodefinedash@#[[text t]] = save on, off, w ; let on = _on_ ; let off = _off_ ; w = 0 ; picture @# ; @# := nullpicture t enddef ; definedash [[myeven]] [[on 3 off 3]] ; beginfig(1) draw (0,0)--(100,100) dashed myeven ; endfig ; end; Is there a better way to do this in metapost? Aditya