From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/10881 Path: main.gmane.org!not-for-mail From: Jens-Uwe Morawski Newsgroups: gmane.comp.tex.context Subject: Re: Re[6]: MetaTricks? Date: Sun, 9 Feb 2003 14:14:19 +0100 Sender: ntg-context-admin@ntg.nl Message-ID: <20030209141419.002ba83d.morawski@gmx.net> References: <14421271667.20030205223819@iol.it> <20030206141641.20382ab9.morawski@gmx.net> <416656420.20030206152912@iol.it> <20030206174938.773342f5.morawski@gmx.net> <592730426.20030206233514@iol.it> <20030207174229.4a406678.morawski@gmx.net> <6510723078.20030207213455@iol.it> <20030208032039.57c116d4.morawski@gmx.net> <20030208172114.A11118@bar.loria.fr> <20030208210732.35329da5.morawski@gmx.net> <20030208221022.A14284@bar.loria.fr> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1044808620 17115 80.91.224.249 (9 Feb 2003 16:37:00 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 9 Feb 2003 16:37:00 +0000 (UTC) Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18huRv-0004Rn-00 for ; Sun, 09 Feb 2003 17:36:59 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 4C9E410B1C; Sun, 9 Feb 2003 17:39:05 +0100 (MET) Original-Received: from mail.gmx.net (mail.gmx.net [213.165.65.60]) by ref.ntg.nl (Postfix) with SMTP id 55A1510AEC for ; Sun, 9 Feb 2003 17:37:57 +0100 (MET) Original-Received: (qmail 6468 invoked by uid 0); 9 Feb 2003 16:37:56 -0000 Original-Received: from port1129.fra.ginko.net (HELO melior.localdomain) (212.202.66.113) by mail.gmx.net (mp006-rz3) with SMTP; 9 Feb 2003 16:37:56 -0000 Original-To: ntg-context@ntg.nl In-Reply-To: <20030208221022.A14284@bar.loria.fr> X-Mailer: Sylpheed version 0.8.9 (GTK+ 1.2.10; i586-pc-linux-gnu) Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:10881 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:10881 On Sat, 8 Feb 2003 22:10:22 +0100 Denis Roegel 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