[NTG-context] mp file not compiling

Aditya Mahajan adityam at umich.edu
Wed May 3 18:14:47 CEST 2006

On Wed, 3 May 2006, Mojca Miklavec wrote:

> On 5/3/06, Aditya Mahajan wrote:
>> Hi,
>>   Is the mp support for btex...etex broken in the latest context
>> (ConTeXt  ver: 2006.04.27 15:59) The following does not compile,
>> \starttext
>> \startMPpage
>>    label(btex This is a test etex, origin) ;
>> \stopMPpage
>> \stoptext
>> I get an error
>> ! Unable to make mpx file.
>> l.123 label(btex
>>                    This is a test etex
>> Even an mp file
>> beginfig(1)
>>    label(btex hello world etex, origin) ;
>> endfig
>>                                         end;
>> with texexec --mptex gives the same error message.
>> Can somebody confirm this? Or is something broken at my end?
> First of all:
> 1. in case you are using windows, update "texmfstart.exe" from
> cont-win.zip (you have to do that every now and then)

I am indeed using windows. I deleted my entire tree and downloaded the 
latest mswincontext.zip, uninstalled it. I verified that 
texmfstart.exe is in the path and ran texmfstart newtexexec --mptex 
and get the same error.

> 2. check that "texexec" is a synonym (for example texexec.bat under
> windows or an executable) for running "texmfstart [new]texexec"

I did check that. texexec is a synonym for texmfstart newtexexec. 
Infact, the example does not compile on live.contextgarden.net I get 
the same error message when I compile the tex file there.

> 3. Hans would say that you have to use "textext" instead of btex ... etex

   label(textext("This is a test"),origin) ;

I get

|| >> test1-mpgraph.mp
|| >> test1-mpgraph.mpx
|| ! Unable to make mpx file.
|| l.124 texpictures[1] := btex
||                              This is a test etex ;

as textext internally uses btex/etex. In the pdf file I get *unknown* 
instead of *This is a test*. I guess that unknown is textext's 
fallback mechanism.

> I doubt that this came with the latest distribution. The btex/etex and
> textext functionality is  a bit broken anyway: sometimes it works and
> sometimes it doesn't.

This is the first time I found it to be broken.

> It depends a lot on the system that you use
> (MikTeX/tetex/standalone), on texexec that you run (texexec or
> newtexexec), how you run it (a batch/shell script with "texmfstart
> [new]texexec" or from linux/windows binaries that come with other
> distributions than the standalone one).

I am using the standalone distribution from pragma on windows.

> It might also be that "write18" is set to off, it might be that some
> \runMP[TEX]graphic[s]true, \forceMP[TEX]graphic[s]true are set to
> false (chech your cont-usr.tex file). (I don't know which variable
> does what, but if you try to use an undefined one, TeX will complain
> anyway. Check the sources or try to switch on all the possible
> combinations of the commands mentioned above.)

I had \runMPgraphicstrue and \runMPTEXgraphicstrue in cont-sys.tex
I added \forceMPTEXgraphictrue to cont-sys.tex and remade the 
formats. Still, I get the same error.

I checked in texmf.cnf and mpxcommand is set to makempx

If I run makempx.exe test.mp test.mpx I get

dvitomp.exe: mpx3568.dvi: No such file or directory
makempx: Command failed: dvitomp mpxerr.dvi test.mpx
makempx: can't move mpx3568.dvi to mpxerr.dvi: No such file or directory

mpx3568.mp has one line "end." and mpxerr.log is empty.

The help of makempx says that makempx is equivalent to
    mpto -tex, texexec --batch --once --nomp, and dvitomp

If I follows these steps manaually, adding --dvi to texexec I get an 
mpx file. My guess that the error is because

1. texmfstart texexec calls newtexexec
2. On the standalone distribution, newtexexec produces pdf by default.

To check this, I created a texexec.bat file in my current directory so 
that it calls texmfstart texexec.pl and everything works fine now.

Thus, for the time being, I have changed my texexec.bat to call 
texexec.pl. To use newtexexec, makempx should be changed to call

texexec --batch --once --nomp --dvi


Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008

More information about the ntg-context mailing list