Taco Hoekwater wrote:
>
> luigi scarso wrote:
>> In
>>
>> \starttext
>> \startTEXpage
>> \startlua
>> metapost.process("metafun",{"beginfig(1);",
>> "a=.7in; b=0.5in;",
>> "z0=(0,0); z1=(a,0); z2=(0,b);",
>> "z0=.5[z1,z3]=.5[z2,z4];",
>> "draw z1..z2..z3..z4..cycle;",
>> "drawarrow z0..z1;",
>> "drawarrow z0..z2;",
>> "label.top(btex $a$ etex, .5[z0,z1]);",
>> "label.lft(btex $b$ etex, .5[z0,z2]);",
>> "endfig;"})
>> \stoplua
>> \stopTEXpage
>> \stoptext
>>
>> there are no labels, but I believe that it's wrong.
>
> The MPlib library embedded in luatex does not actually
> support btex .. etex blocks.
>
> It is planned to intercept such blocks in the mkiv lua
> code, but for now, just use textext().
why not use
\starttext
\startMPpage
a=.7in; b=0.5in;
z0=(0,0); z1=(a,0); z2=(0,b);
z0=.5[z1,z3]=.5[z2,z4];
draw z1..z2..z3..z4..cycle;
drawarrow z0..z1;
drawarrow z0..z2;
label.top(btex $a$ etex, .5[z0,z1]);
label.lft(btex $b$ etex, .5[z0,z2]);
endfig;
\stopMPpage
\stoptext
this uses:
metapost.graphic(mpsformat,str,preamble)
which does intercept the btex/etex
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________