ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: David Arnold <darnold@northcoast.com>
Subject: Inlcuding Metapost
Date: Wed, 02 Jun 1999 13:29:18 -0700	[thread overview]
Message-ID: <3.0.5.32.19990602132918.00a5ee80@mail.northcoast.com> (raw)

All,

I want to put metapost graphics in my file. This works, but I have to run
texexec twice. Hmmm... Why?

% interface=en output=pdf

\starttext

\setuppapersize[S6][S6]

\setupbodyfont[pos,14.4pt]

\setupcolors[state=start]

\setupinteraction[state=start]

There is a \gotobox {\tooltip {last page} {indeed, klicking here
will bring you to the last page}} [nextpage] too in this document.

\MPinclusions{input mp-tool}

\startreusableMPgraphic{pb}
path squares[];
numeric side;
side=10cm;
squares0=unitsquare scaled side;
draw squares0;
y1=0;x2=side;
x1=side/25;y2=x1;
d=angle(z2-z1);
r=abs(z2-z1)/side;
for i:=1 upto 80:
squares[i]:=squares[i-1] shifted (-side/2,-side/2)
rotated d scaled r shifted (side/2,side/2);
draw squares[i] withcolor (i/100)[blue,green];
endfor
\stopreusableMPgraphic

\reuseMPgraphic{pb}\reuseMPgraphic{pb}\reuseMPgraphic{pb}\reuseMPgraphic{pb}
\quad

\page

>From this it follows that there is also a \gotobox {\tooltip
{first page} {this button lets you go to the first page}}
[firstpage].

\stoptext

Also, this is probably not the right way to do things, so I am open to
suggestion from the Maestros. Please advise. 

Also, I would like to center, scale, float the MP graphic, etc. I would
love to see how.


                 reply	other threads:[~1999-06-02 20:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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.5.32.19990602132918.00a5ee80@mail.northcoast.com \
    --to=darnold@northcoast.com \
    /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).