[metapost] Metapost btex etex problem

"Rothfuß, Ralf" Ralf.Rothfuss at hs-esslingen.de
Wed Jul 31 06:53:16 CEST 2013

I changed the line from %&pdflatex to %&latex

  draw (0,0)--(5cm,0) withpen pencircle scaled 1pt;
  label.rt(btex $A$ etex, (5cm, 1cm));

%% End

Compiling produces now the same error:

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 mpa05556.tex
makempx debug: ./mpsimple.mp: renaming mpa05556.tex to mpxerr.tex
makempx debug: ./mpsimple.mp: renaming mpa05556.log to mpxerr.log
fatal: Command failed: etex --parse-first-line --interaction=nonstopmode mpa05556.tex; see mpxerr.logmakempx fatal: ./mp
simple.mp: Command failed: etex --parse-first-line --interaction=nonstopmode mpa05556.tex; see mpxerr.log

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

Again, the latex command works on the generated mpa05556.tex

c:\tmp>etex --parse-first-line mpa05556.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 mpa05556.aux.
[1] (./mpa05556.aux) )
Output written on mpa05556.dvi (1 page, 192 bytes).
Transcript written on mpa05556.log.

The map05556.dvi looks reasonable (it contains an A with a vertical bar). If I try to invoke dvitomp it returns

c:\tmp>dvitomp mpa05556.dvi mpa05556.mpx
fatal: DVI generation failed

What is my mistake?

Best regards

-----Original Message-----
From: Karel Horak [mailto:akk64 at quick.cz] 
Sent: Wednesday, July 31, 2013 1:50 AM
To: Rothfuß, Ralf
Cc: metapost at tug.org
Subject: Re: [metapost] Metapost btex etex problem

Rothfuß, Ralf napsal(a):
> Hello,
> I have a problem with the use of btex ... etex in MetaPost figures. Searching already for quite a while I found a lot of similar issues but unfortunately without a  solution.
> The installation I am using is a recent installed TeX Live 2013 on Windows 8 (64bit) .  I used the install-tl-advanced.bat for installation (including "full scheme").
> I want to  compile the following (reduced) example mpsimple.mp:
> verbatimtex
> %&pdflatex
If you call pdflatex, pdftex produces pdf, not dvi, and pdf is non usable for dvitomp. It means you should call only latex, or use
on the next line.

Karel Horak

More information about the metapost mailing list