ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Inlcuding Metapost
@ 1999-06-02 20:29 David Arnold
  0 siblings, 0 replies; only message in thread
From: David Arnold @ 1999-06-02 20:29 UTC (permalink / 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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-06-02 20:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-02 20:29 Inlcuding Metapost David Arnold

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