[metapost] Problem using LaTeX in MetaPost

Reinhard Kotucha reinhard.kotucha at web.de
Tue Feb 7 20:44:21 CET 2012


On 2012-02-07 at 19:06:12 +0100, Karel wrote:

 > > This is TeX, Version 3.1415926 (MiKTeX 2.9) (preloaded format=tex 
 > > 2012.2.7)  7 FEB 2012 10:28
 > > **mp632087.tex

 > Maybe version 1.504 of MP does not write the texfile correctly.
 > Try to look in the corresponding file (you will find its name in 
 > the log file), if %&latex would not be at the first line, then 
 > perhaps try to find older MikTeX version of MP (1.212 works fine, 
 > I hope).

Which program actually evaluates the %&latex line?

 > > This is TeX, Version 3.1415926 (MiKTeX 2.9) (preloaded format=tex 
 > > 2012.2.7)  7 FEB 2012 10:28
 > > **mp632087.tex

This is obviously Knuth's TeX but the LaTeX format requires pdftex.  I
don't think the %&latex line can work here.  A better solution is to
make etex the default engine.  It's built upon pdftex too.

In TeX Live etex is the default engine indeed.  When I remove the
%&latex line, I get

This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011) (format=etex 2012.1.16)  7 FEB 2012 20:39
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**mpyty8eE.tex
(./mpyty8eE.tex
! Undefined control sequence.
l.1 \documentclass
                  {article}

So it's a bug in MiKTeX.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha                                      Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                              mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------


More information about the metapost mailing list