[metapost] mpx file ended unexpectedly

Sanjoy Mahajan sanjoy at mrao.cam.ac.uk
Thu Feb 15 05:13:58 CET 2007


Here is as minimal an example as I could make for a "mpx file ended
unexpectedly" error.  

Here is fig.mp :

  input TEX

  def oneline (expr t, m) =
    label (TEX(decimal(m)), origin);
  enddef;

  beginfig(1)
    oneline(btex a etex, 1);
  endfig;

  beginfig(2)
  input fig.1
  endfig;

  end

Here is fig.1.mp:

  oneline(btex item etex, 2);
  oneline(btex item etex, 3);

Then "mpost fig.mp" produces this error:

  ! mpx file ended unexpectedly.
  l.12 

If "input fig.1" is changed to "input fig.1.mp", then all is well.  But
I don't understand how it helps.  With "input fig.1", mpost still reads
from fig.1.mp, as the terminal output shows:

  $ mpost fig
  This is MetaPost, Version 0.993 (Web2C 7.5.5)
  (fig.mp (/usr/local/share/texmf/metapost/base/TEX.mp) (mptextmp.mp) [1]
  (fig.1.mp (mptextmp.mp)

(or see fig.log)

So I'm confused.  Is it a problem reading mptextmp.mp?  Or mpost getting
confused between fig.1 (the EPS figure) and fig.1.mp?

I'm using metapost 0.993 (on i386, Ubuntu).  I've attached the test
files and the resulting log and output.

-Sanjoy

`A nation of slaves is always prepared to applaud the clemency of their
 master who, in the abuse of absolute power, does not proceed to the
 last extremes of injustice and oppression.'  (Gibbon)  

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/x-gtar
Size: 2062 bytes
Desc: test files
Url : http://tug.org/pipermail/metapost/attachments/20070214/320c1268/attachment.gtar 


More information about the metapost mailing list