Hi All
I am new to the Metapost and Context world, and need some help regarding the inclusion of Metapost graphics in ConTeXt documents. I am trying a very simple approach, using a graphic as a background. Here's my sample (using a very basic metapost graphic as a page background in a document):
Metapost:
========
beginfig(0);
theta := 360/7;
radius := 1in;
z0 = origin;
z1 = z0 + dir(90)*radius;
z2 = z0 + dir(90 + theta)*radius;
z3 = z0 + dir(90 + 2*theta)*radius;
z4 = z0 + dir(90 + 3*theta)*radius;
z5 = z0 + dir(90 + 4*theta)*radius;
z6 = z0 + dir(90 + 5*theta)*radius;
z7 = z0 + dir(90 + 6*theta)*radius;
draw z1 -- z2 -- z3 -- z4 -- z5 -- z6 -- z7
-- cycle;
endfig;
end;
ConTeXt (after running mpost on the metapost graphic to generate the hexagon.0 file):
=====================================================================
\defineoverlay
[backg]
[{\externalfigure[hexagon.0][width=\overlaywidth,height=\overlayheight]}]
\starttext
\noheaderandfooterlines
\setupbackgrounds[page][background=backg]
%\placefigure
%{none}
%{\externalfigure[hexagon.0][width=12cm]}
\stoptext
Thanks in advance
Syed