[metapost] circleit.aa does not work.
John
heimdal at aracnet.com
Sat Apr 8 17:44:51 CEST 2006
Hello,
The example code below hangs after invoking mpost, with the following
text "... ! Isolated expression. ... . I believe that I am missing the
source for these wondrous macros, that would be instrumental to my being
able to generate the graphics, flowcharts, and such, that I need to do.
Any guidance would be greatly appreciated.
beginfig(9);
vardef cuta(suffix a,b) expr p =
drawarrow p cutbefore bpath.a cutafter bpath.b;
point .5*length p of p
enddef;
vardef self@# expr p =
cuta(@#,@#) @#.c{curl0}..@#.c+p..{curl0}@#.c enddef;
verbatimtex
\def\stk#1#2{$\displaystyle{\matrix{#1\cr#2\cr}}$} etex
circleit.aa("Start"); aa.dx=aa.dy;
circleit.bb(btex \stk B{(a|b)^*a} etex);
circleit.cc(btex \stk C{b^*} etex);
circleit.dd(btex \stk D{(a|b)^*ab} etex);
circleit.ee("Stop"); ee.dx=ee.dy;
numeric hsep;
bb.c-aa.c = dd.c-bb.c = ee.c-dd.c = (hsep,0);
cc.c-bb.c = (0,.8hsep);
xpart(ee.e - aa.w) = 3.8in;
drawboxed(aa,bb,cc,dd,ee);
label.ulft(btex$b$etex, cuta(aa,cc) aa.c{dir50}..cc.c);
label.top(btex$b$etex, self.cc(0,30pt));
label.rt(btex$a$etex, cuta(cc,bb) cc.c..bb.c);
label.top(btex$a$etex, cuta(aa,bb) aa.c..bb.c);
label.llft(btex$a$etex, self.bb(-20pt,-35pt));
label.top(btex$b$etex, cuta(bb,dd) bb.c..dd.c);
label.top(btex$b$etex, cuta(dd,ee) dd.c..ee.c);
label.lrt(btex$a$etex, cuta(dd,bb) dd.c..{dir140}bb.c);
label.bot(btex$a$etex,
cuta(ee,bb) ee.c..tension1.3 ..{dir115}bb.c);
label.urt(btex$b$etex,
cuta(ee,cc) ee.c{(cc.c-ee.c)rotated-15}..cc.c);
endfig;
bash-3.00$ !mpost
mpost oval.mp
This is MetaPost, Version 0.641 (Web2C 7.5.4)
(oval.mp
>> circleit.aa
! Isolated expression.
<to be read again>
(
l.10 circleit.aa(
"Start"); aa.dx=aa.dy;
? X
Transcript written on oval.log.
bash-3.00$
Thanks for your time,
John
More information about the metapost
mailing list