# [tex-live] [TL 2010] metapost bug (or feature...)

Benoit RIVET benoit.rivet at free.fr
Fri Oct 8 18:49:26 CEST 2010

I stumbled on a new feature in metapost 2010, which resulted in compilation bugs that did not happen with TL 2009. Here's a minimal example :

verbatimtex
%&latex
\documentclass{article}
\begin{document}
etex

beginfig(1);
label.lft(btex $0$ etex, (0,0));
endfig;

\end

Note that I left a space before %& latex on line 2 : this causes a fatal bug with metapost 2010, which tries to use tex (not latex) to draw the labels :

This is MetaPost, version 1.211 (TeX Live 2010) (kpathsea version 6.0.0)
(./test.mpfatal: Command failed: etex --parse-first-line --interaction=nonstopmode mp0tGsM6.tex; see mpxerr.log
>> test.mp
>> test.mpx
! Unable to make mpx file.
l.9 label.lft(btex
$0$ etex, (0,0));
Transcript written on test.log.
No output file generated.

Strangely enough, the same file compiles fine with texlive 2009.

Changing :
%&latex
to
%&latex
(without the extra space) solves the problem...

This does not qualify as a bug, since it happens only with bad coding practice, but it took me quite some time to understand what was going on :-)