[metapost] Metapost btex etex problem

"Rothfuß, Ralf" Ralf.Rothfuss at hs-esslingen.de
Wed Jul 31 08:57:24 CEST 2013

I cleaned the entire directory except mpsimple.mp and I get the same error with mpost 1.803.
C:\tmp>mpost --debug mpsimple.mp
This is MetaPost, version 1.803 (kpathsea version 6.1.1)
(mpost.mp (c:/rt/texlive/2013/texmf-dist/metapost/base/plain.mp
Preloading the plain mem file, version 1.004) ) (./mpsimple.mpmakempx debug: ./mpsimple.mp: running command etex --parse
-first-line --interaction=nonstopmode mpa00632.tex
makempx debug: ./mpsimple.mp: renaming mpa00632.tex to mpxerr.tex
makempx debug: ./mpsimple.mp: renaming mpa00632.log to mpxerr.log
fatal: Command failed: etex --parse-first-line --interaction=nonstopmode mpa00632.tex; see mpxerr.logmakempx fatal: ./mp
simple.mp: Command failed: etex --parse-first-line --interaction=nonstopmode mpa00632.tex; see mpxerr.log

>> mpsimple.mp
>> mpsimple.mpx
! ! Unable to make mpx file.
l.11   label.rt(btex
                     $A$ etex, (5cm, 1cm));
Transcript written on mpsimple.log.

C:\tmp>etex --parse-first-line mpa00632.tex
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/W32TeX)
 restricted \write18 enabled.
entering extended mode
LaTeX2e <2011/06/27>
Babel <3.9f> and hyphenation patterns for 78 languages loaded.
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
No file mpa00632.aux.
[1] (./mpa00632.aux) )
Output written on mpa00632.dvi (1 page, 192 bytes).
Transcript written on mpa00632.log.

C:\tmp>dvitomp mpa00632.dvi mpa00632.mpx

However, the dvitomp works now (maybe due to the cleaning of the directory).

The mpx file looks like
% Written by dvitomp version 1.803
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)--(8.7753,0.0000)--
_p endgroup

I also tried dvips map00632 and it works.
What is the next step after having generated the mpx? Do I have to install additional software like ghostscript (I found it in the texlive directory) or do I have to set environment variables (so far I thought it is not necessary with TeXLive).

Thank you so far for your fast responses.

Best regards
-----Original Message-----
From: Karel [mailto:horakk at math.cas.cz] 
Sent: Wednesday, July 31, 2013 9:44 AM
To: Rothfuß, Ralf
Cc: metapost at tug.org
Subject: Re: [metapost] Metapost btex etex problem

Rothfuß, Ralf napsal(a):
> I changed the line from %&pdflatex to %&latex
> verbatimtex
> %&latex
> \documentclass[12pt]{article}
> \usepackage[latin1]{inputenc}
> \usepackage[T1]{fontenc}
> \begin{document}
> etex
> beginfig(1)
>   draw (0,0)--(5cm,0) withpen pencircle scaled 1pt;
>   label.rt(btex $A$ etex, (5cm, 1cm)); endfig;
> end;
> %% End
> What is my mistake?

Now everything works fine for me, even if I first reproduce the error with pdf output (sometimes it helps deleating all the output files (*.mpx, mpxerr.tex) before, but in that case I did not that). I am still using mpost 1.212 as a safe version, only later I'll try to test the last version you are using...

All the best,

More information about the metapost mailing list