[metapost] mptopdf crash

Hans Hagen pragma at wxs.nl
Fri Nov 13 16:40:23 CET 2009


Oliver Buerschaper wrote:

> l.41 B-1 -1  s
>                S Q
> ?
> ---
> 
> What's going on here?

the parser expects a space after the B and as this case (scale instead 
of transform) happens seldom, this went unnoticed

a quick way out is to add the line:

mpprocset := 0 ;

which will trigger more verbose postscript which works ok

this item is tracked in the bug tracker and will be resolved in a next 
release

btw, if you you context mkiv as

\startMPpage
     Phi := (1+sqrt(5))/2;       % golden ratio

     def drawmidarrow (expr p, t) =
        draw p;
        filldraw arrowhead 
subpath(0,arctime(t*(arclength(p)-ahlength)+ahlength) of p) of p;
     enddef;

     s := 6mm;
     l := Phi*Phi*s;
     d := l-2mm;

     path box; box := unitsquare scaled s shifted (-s/2,-s/2);

     path piece; piece := ((quartercircle scaled d) cutbefore (box 
xshifted l/2)) cutafter (box yshifted l/2);

     picture pic;
     pic := image(drawmidarrow(piece, 0.5));

     draw pic; draw pic rotated 180;
\stopMPpage

and process that file with the context command it also comes out right

Hans


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


More information about the metapost mailing list