[metapost] Bug in metapost 1.203 ?

Dan Luecking luecking at uark.edu
Wed Jun 24 23:10:33 CEST 2009

At 10:05 AM 6/24/2009, Christophe Poulain wrote:
>i've tried this with metapost 1.203
>label(btex Dur\'ee etex,cm*(1,1));
>no problem.
>But with this
>label(btex Dur\'ee etex,cm*(1,1));
>there's no compilation : she isn't stop !

I can confirm. In fact I get the same result from the smaller

I was able to use use the sequence mpto -tex + latex + dvitomp
to produce an mpx file. Even in the presence of this mpx file,
mpost hangs.

Here is that mpx file. It seems innocuous:

% Written by dvitomp version 1.203
begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture;
string _n[];
vardef _s(expr _t,_f,_m,_x,_y)(text _c)=
   addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef;
setbounds _p to (0,0.0000)--(25.8965,0.0000)--
_p endgroup

Some tests: adding \usepackage{lmodern} changes the font,
but the same hanging problem occurs.

When it hangs, hitting ctrl-C halts it. The PS output
is already megabytes in size and contains hundresd of
thousands of lines like:

%*Font: ecrm1000 9.96265 9.96265 44:8000000040024
%*Font: ecrm1000 9.96265 9.96265 e9:0
%*Font: ecrm1000 9.96265 9.96265 65:80048

The first line is unique but the second and third line are
repeated forever (apparently).

Editing the mpx, changing char233 to some other numbers, can
change the behavior: It seems not to hang for char175 or less
but does hang for char176 or more. I did not actually test all
numbers 0--255, but only the following in this order
   char233 : failure
   char33 char133 : success
   char183 : failure
   char163 char173 : success
   char178 char177 char176 : failure
   char175 char174 : success

If I change char233 to char175 (the highest that worked) there
is only one similar line:

%*Font: ecrm1000 9.96265 9.96265 44:800000004002400000000000001

Although the last number is suspiciously large, the eps file can
be processed and viewed. Of course it does not contain an eacute
but rather an racute (char175 in T1 encoding).

>I use Linux+Debian Lenny+TexLive.

And I use Windows XP Pro (SP3) with TeX Live 2008.

Hope this helps.


Daniel H. Luecking
Department of Mathematical Sciences
University of Arkansas
"Dubito ergo cogito, cogito ergo sum" --Descartes

More information about the metapost mailing list