On Sat, 8 Feb 2003 22:10:22 +0100
Denis Roegel <[EMAIL PROTECTED]> wrote:

> 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!

IMO it is very useful for its task, esp since it has no
limitations like keyvalMP.
 
> > 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.

what are you doing here? Do you read the parameter as suffix and
convert it with 'str' in a string?

> 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.

agree, but in case of a workaround i could use ';' as seperators
in the keyval-list and so all problems are gone:

YourKeyValMacro(logo=image(draw origin); shape=fullcircle scaled 2)

or one can use special symbols to mark strings

"logo=something,shape=anything,text=''some words'' "

But the question i had was to write a keyval package
that implements an interface the users know or are familiar with.

> > it will not work, since metaobj relies on macros as values.
> 
> What example did you have in mind?

nothing specific, but for example the treemode-thing you gave above;
here treemode is a macro and i believe that it does more than
assigning the parameter "U" to an internal variable. So you have to
rewrite many parts of metaobj. We can try it if you are interested but
currently keyvalMP is only used in 3 of my packages and none of them
is released. so, we need some testing and have to look if the
limitations allow all things required for meatobj to be implemented.

Jens 
_______________________________________________
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to