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: Sat, 8 Feb 2003 21:07:32 +0100	[thread overview]
Message-ID: <20030208210732.35329da5.morawski@gmx.net> (raw)
In-Reply-To: <20030208172114.A11118@bar.loria.fr>

On Sat, 8 Feb 2003 17:21:14 +0100
Denis Roegel <Denis.Roegel@loria.fr> wrote:

> On Sat, Feb 08, 2003 at 03:20:39AM +0100, Jens-Uwe Morawski wrote:
> > On Fri, 7 Feb 2003 21:34:55 +0100
> > Giuseppe Bilotta <gip.bilotta@iol.it> wrote:
> > 
> > > Friday, February 7, 2003 Jens-Uwe Morawski wrote:
> > > JUM> Do you mean something like in the attached files?
> > > JUM> keyvalmp.mp : package for key-value parameters in MP; used in mpt-conf.mp
> > > JUM>               (BTW, if anybody knows a better way to implement this, please
> > > JUM>                let me know)
> > > JUM> mptricks.mp : base MPTricks package
> > > JUM> mpt-conf.mp : MPTricks module that implements the requested feature
> > > JUM> mpt-test.mp : the example file
> > > 
> > > EXTREMELY interesting! Thank you very much!
> > 
> > Hmm, it's only the beginning ;-)
> > Can you point me to an up-to-date and good documentation
> > about PSTricks basics, so I can see what else is needed.
> 
> The only documentation is from 1993. You can find it on CTAN. Or here:
> 
>   http://tex.loria.fr/graph-pack/pstricks/pst-usr1.pdf
>   http://tex.loria.fr/graph-pack/pstricks/pst-usr2.pdf
>   http://tex.loria.fr/graph-pack/pstricks/pst-usr3.pdf
>   http://tex.loria.fr/graph-pack/pstricks/pst-usr4.pdf
>   http://tex.loria.fr/graph-pack/pstricks/pst-doc1.pdf
>   http://tex.loria.fr/graph-pack/pstricks/pst-doc2.pdf

hmm, this is the docu i know. I really do not like to find
out in pst-doc* what has changed compared to pst-usr*.

Currently i have no plans for MPTricks, eps since MP has
IMO too many limitations. 

> When you give options like `a=b', 
> can a and b be defined as macros beforehand, or is that incompatible?

a (the key) is only a local variable of specific type

The macro that processes the keyval-parameters changes the meaning
of ',' to be like a ';'
Since colors and pairs contain commas too, it changes also the meaning
of '(' and ')', so the grouping of (...) is not broken. But now it
expects that (...) is a pair or color.
Therefore you cannot use something that contains '(' and ')' as
the value b if it is no color or pair.

for example:
picture pic ; pic:=image(draw origin) ;
YourKeyValMacro(logo=pic) ;

is possible, but not
YourKeyValMacro(logo=image(draw origin)) ;

on the other hand, some simple primaries work:
YourKeyValMacro(shape=fullcircle scaled 2) ;


> 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 ;)

My first implementation based also on strings, i.e.
"logo=something,shape=anything"
but this doesn't allow strings to be passed as values. 


> I am thinking that it would be nice if sometime in the future
> we could have metaobj with your syntax for options.

it will not work, since metaobj relies on macros as values.
Or would you like to rewrite metaobj completely? :)
It's a nice and useful package, as it currently is.

> On the other hand,
> if one uses a metapost package within context, the syntax doesn't
> have so many constraints, because you can hide it with TeX's syntax.

if you hide MP with TeX code then you will loose the programming
capabilities of MP. Thus, the user is forced to TeX-programming that
is much harder to learn. IMO, using TeX on top of MP makes sense for
specific applications (for example, contexts flow-chart module or my
piechartMP package) but not for "low-level" graphics operations.

AND i really like the metapost language.

draw MyNicePath withcolor red

this is not programming, this is conversation ;)

Best,
  Jens

  parent reply	other threads:[~2003-02-08 20:07 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 [this message]
2003-02-08 21:10                   ` Denis Roegel
2003-02-09 13:14                     ` Jens-Uwe Morawski
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=20030208210732.35329da5.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).