[Gllug] metapost woes

Stig Brautaset stigbrau at start.no
Wed Sep 4 14:40:26 UTC 2002



Hello again GLLUG'ers,

I'm experimenting with MetaPost, but experience trouble with the `label'
primitive. If I use a label in a MetaPost-file and process it with
MetaPost it produces a postscript file as normal. The problem is that it
makes ghostscript barf. Files that does not use the `label' primitive
works fine.

To illustrate the problem, I have made two files: s.mp and t.mp, where
the first contains no labels, thus cause no trouble for gs. I include
the test files, output from MetaPost, the postscript file produced by
MetaPost, and the output from gs.

$ cat s.mp
beginfig(1);
z0=(0,0);
z1=(1in,3in);
z2=(2in,4in);
drawarrow z0..z1..z2;
endfig;
end

$ mpost s.mp
This is MetaPost, Version 0.641 (Web2C 7.3.7)
(s.mp [1] )
1 output file written: s.1
Transcript written on s.log.

$ cat s.1
%!PS
%%BoundingBox: -1 -1 145 289
%%Creator: MetaPost
%%CreationDate: 2002.05.02:0146
%%Pages: 1
%%EndProlog
%%Page: 1 1
 0 0.5 dtransform truncate idtransform setlinewidth pop [] 0 setdash
 1 setlinecap 1 setlinejoin 10 setmiterlimit
newpath 0 0 moveto
0.10732 77.87582 25.36037 153.63495 72 216 curveto
92.43192 243.3209 116.6791 267.56808 144 288 curveto stroke
newpath 141.97652 284.54926 moveto
142.64444 285.70305 143.31894 286.85332 144 288 curveto
142.70758 287.67079 141.41727 287.3344 140.1291 286.99084 curveto
 closepath
gsave fill grestore stroke
showpage
%%EOF

$ gs s.1
GNU Ghostscript 6.53 (2002-02-13)
Copyright (C) 2002 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file COPYING for details.
>>showpage, press <return> to continue<<
GS>quit

As can be seen, the above caused no trouble for gs. The below, however,
does. I have typed in other examples too, directly from the MetaPost
manual, but all the ones with labels in them fail. Does anyone else
experience this? Is there something fundamentally wrong with my system,
or should I file a bug report?

$ cat t.mp
beginfig(1);
z0=(2in,4in);
label("hello world", z0);
endfig;
end

$ mpost t.mp
This is MetaPost, Version 0.641 (Web2C 7.3.7)
(t.mp [1] )
1 output file written: t.1
Transcript written on t.log.

$ cat t.1
%!PS
%%BoundingBox: 120 284 168 292
%%Creator: MetaPost
%%CreationDate: 2002.05.02:0146
%%Pages: 1
%*Font: cmr10 9.96265 9.96265 20:80000000000000000c8921
%%EndProlog
%%Page: 1 1
120.18643 284.54074 moveto
(hello world) cmr10 9.96265 fshow
showpage
%%EOF

$ gs t.1
GNU Ghostscript 6.53 (2002-02-13)
Copyright (C) 2002 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file COPYING for details.
Error: /undefined in cmr10
Operand stack:
   (hello world)
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--  
--nostringval--
+2   %stopped_push   --nostringval--   --nostringval--   --nostringval-
-   false   1
+%stopped_push   1   3   %oparray_pop   1   3   %oparray_pop   1 
3   %oparray_pop
+.runexec2   --nostringval--   --nostringval--   --nostringval-- 
2   %stopped_push
+--nostringval--   --nostringval--   --nostringval--
Dictionary stack:
   --dict:1034/1476(ro)(G)--   --dict:0/20(G)--   --dict:67/200(L)--
Current allocation mode is local
Current file position is 227
GNU Ghostscript 6.53: Unrecoverable error, exit code 1

Hopefully some kind soul can shed some light on this  problem for me.

Stig

-- 
brautaset.org




================================================================
Access over 330 professionally developed online training courses
and hundreds of free tutorials and jobs.  Click below for details
      http://www.beginners.co.uk
================================================================



-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list