On Sat, Feb 08, 2003 at 09:07:32PM +0100, Jens-Uwe Morawski wrote:
That's one of the problems I had in metaobj, hence my contrived way of passing parameters.
your way inspired me to try something like the keyvalMP package ;)
Thanks, at least it was useful to provide ideas to others!
My first implementation based also on strings, i.e. "logo=something,shape=anything" but this doesn't allow strings to be passed as values.
Yes, but there are workarounds. If you always expect a string as a value, and if this value doesn't contain commas, you can make it a string afterwards. That is what I do in metaobj. For instance, what you just wrote becomes "logo(something)","shape(anything)" (you get used to it, and a TeX interface can hide it if necessary) In cases where the value is a string, for instance when I specify the drawing direction of a tree, I write "treemode(U)" for treemode="U", but the parser knows to make a string of it. I found that this works reasonably well and I don't have constraints on my keys and values.
it will not work, since metaobj relies on macros as values.
What example did you have in mind?
Or would you like to rewrite metaobj completely? :)
Of course not. It took me a while to write it.
if you hide MP with TeX code then you will loose the programming capabilities of MP.
I was not thinking of hiding it completely, but just like in PSTricks where one can mix TeX and PS, here one could mix TeX and MP. Actually, this is already the case in ConTeXt when you embed MP code. Denis