From: Hans Hagen <pragma@wxs.nl>
Cc: ntg-context@ntg.nl, roegel@lorraine.loria.fr (Denis B. Roegel)
Subject: Re: is there a problem with local definitions in metafun?
Date: Fri, 08 Dec 2000 20:18:07 +0100 [thread overview]
Message-ID: <3.0.6.32.20001208201807.015bec20@pop.wxs.nl> (raw)
In-Reply-To: <200012081641.RAA27218@bar.loria.fr>
At 05:41 PM 12/8/00 +0100, Denis B. Roegel wrote:
>When porting a standard metapost example to context,
>I noticed that there was a problem with local definitions.
>For instance, in my original file, I had
>
>beginfig(1);
>
> ...
> def ...
>
> vardef ...
>
> other code
>endfig;
>end
>
>But I first naively translated this into
>
>\startuseMPgraphic{dummy}
>
> ...
> def ...
>
> vardef ...
>
> other code
>\stopuseMPgraphic
>
>(as it works for an example in the metafun manual)
>
>It didn't work with my example and I had to split the code:
>
>\startMPinclusions
>
> ...
> def ...
>
> vardef ...
>\stopMPinclusions
>
>\startuseMPgraphic{dummy}
> other code
>\stopuseMPgraphic
>
>Is there an explanation for this?
I don't understand this. Everything between start/stop...MPgraphic becomes
a begin/endfig, so local defs should end up there.
A problem can arise when one graphic defined a macro and another one uses
it, while the graphics are processed independently.
You can so things like:
\startuseMPgraphic{common}
some code
\stopuseMPgraphic
\startuseMPgraphic{aaa}
\includeMPgraphic{common}
some more code
\stopuseMPgraphic
\useMPgraphic{aaa}
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
next prev parent reply other threads:[~2000-12-08 19:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-08 16:41 Denis B. Roegel
2000-12-08 19:18 ` Hans Hagen [this message]
2000-12-08 21:25 ` Denis B. Roegel
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=3.0.6.32.20001208201807.015bec20@pop.wxs.nl \
--to=pragma@wxs.nl \
--cc=ntg-context@ntg.nl \
--cc=roegel@lorraine.loria.fr \
/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).