ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Jens-Uwe Morawski <morawski@gmx.net>
Subject: Re: Re[6]: MetaTricks?
Date: Sun, 9 Feb 2003 14:14:19 +0100	[thread overview]
Message-ID: <20030209141419.002ba83d.morawski@gmx.net> (raw)
In-Reply-To: <20030208221022.A14284@bar.loria.fr>

On Sat, 8 Feb 2003 22:10:22 +0100
Denis Roegel <Denis.Roegel@loria.fr> 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 

  reply	other threads:[~2003-02-09 13:14 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-05 21:38 MetaTricks? Giuseppe Bilotta
2003-02-06 13:16 ` MetaTricks? Jens-Uwe Morawski
2003-02-06 14:29   ` Re[2]: MetaTricks? Giuseppe Bilotta
2003-02-06 16:49     ` Jens-Uwe Morawski
2003-02-06 22:35       ` Re[4]: MetaTricks? Giuseppe Bilotta
2003-02-06 23:03         ` MetaTricks? Denis Roegel
2003-02-06 23:14           ` Re[2]: MetaTricks? Giuseppe Bilotta
2003-02-07 16:42         ` Re[4]: MetaTricks? Jens-Uwe Morawski
2003-02-07 20:34           ` Re[6]: MetaTricks? Giuseppe Bilotta
2003-02-08  2:20             ` Jens-Uwe Morawski
2003-02-08 16:21               ` Denis Roegel
2003-02-08 19:23                 ` Hans Hagen
2003-02-08 23:18                   ` Jens-Uwe Morawski
2003-02-09 18:18                     ` Hans Hagen
2003-02-10 22:36                       ` Jens-Uwe Morawski
2003-02-12 12:25                         ` Hans Hagen
2003-02-12 14:25                           ` Jens-Uwe Morawski
2003-02-12 18:28                           ` Denis Roegel
2003-02-13  0:22                             ` Jens-Uwe Morawski
2003-02-13  0:58                               ` Denis Roegel
2003-02-13 10:51                                 ` Jens-Uwe Morawski
2003-02-13 10:52                                 ` Hans Hagen
2003-02-13 10:53                               ` Hans Hagen
2003-02-08 20:07                 ` Jens-Uwe Morawski
2003-02-08 21:10                   ` Denis Roegel
2003-02-09 13:14                     ` Jens-Uwe Morawski [this message]
2003-02-09 18:30                       ` Denis Roegel
2003-02-10 15:05                         ` Jens-Uwe Morawski
2003-02-08 20:00           ` Re[4]: MetaTricks? Hans Hagen
2003-02-10 15:36             ` Jens-Uwe Morawski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030209141419.002ba83d.morawski@gmx.net \
    --to=morawski@gmx.net \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).