From: Hans Hagen <pragma@wxs.nl>
Subject: Re: \setupMPvariables in \startMPpage
Date: Tue, 27 Dec 2005 21:58:55 +0100 [thread overview]
Message-ID: <43B1AB0F.1000300@wxs.nl> (raw)
In-Reply-To: <59B47784-1D9E-4A55-8388-FAC239275E20@cox.net>
David Arnold wrote:
> Why doesn't this work?
>
> %output=pdf
>
> \startuseMPgraphic{usquare}
> draw unitsquare scaled \MPvar{u};
> \stopuseMPgraphic
>
> \starttext
>
> \startMPpage
> \setupMPvariables[usquare][u=4cm]
> \includeMPgraphic{usquare}
> \stopMPpage
>
> \stoptext
because
(1) after startMPpage metapost code is expected (or something like
\includeMPgraphic{...} that expands to mp code
(2) when the setup is moved outside the startMPpage, contex does not
know what vars to preset
however, this works (MPrawvar is undocumented, yet)
\startuseMPgraphic{usquare}
draw unitsquare scaled \MPrawvar{usquare}{u};
\stopuseMPgraphic
\starttext
\setupMPvariables[usquare][u=4cm]
\startMPpage
\includeMPgraphic{usquare}
\stopMPpage
\stoptext
prev parent reply other threads:[~2005-12-27 20:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-26 21:26 David Arnold
2005-12-26 23:01 ` Willi Egger
2005-12-27 20:55 ` Hans Hagen
2005-12-27 20:58 ` Hans Hagen [this message]
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=43B1AB0F.1000300@wxs.nl \
--to=pragma@wxs.nl \
--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).