[metapost] Strange behaviour

Nicolas FRANCOIS nicolas.francois at free.fr
Mon Mar 13 02:52:02 CET 2006


Can someone explain this to me ? It's driving me crazy ! The context is a
Debian Sarge distribution, but I experienced it on a LFS. Both times,
with teTeX, 2.0 or 3.0. The TEX variable is unset on Debian, set to TEX
on LFS.

********************** begin of example ********************************
nico at detritus:~/travail/essai_metapost$ cat essai.mp
verbatimtex
\documentclass{arnaudies}
\begin{document}
etex

beginfig(1);
  label.llft(btex O etex,(2cm,0cm));
endfig;

verbatimtex
\end{document}
etex

end

nico at detritus:~/travail/essai_metapost$ mpost -tex=latex essai.mp
This is MetaPost, Version 0.641 (Web2C 7.4.5)
(essai.mp [1] )
1 output file written: essai.1
Transcript written on essai.log.
nico at detritus:~/travail/essai_metapost$ rm essai.1 essai.log essai.mpx
nico at detritus:~/travail/essai_metapost$ ls
essai.mp
nico at detritus:~/travail/essai_metapost$ cat essai.mp
input courbes;

verbatimtex
\documentclass{arnaudies}
\begin{document}
etex

beginfig(1);
  label.llft(btex O etex,(2cm,0cm));
endfig;

verbatimtex
\end{document}
etex

end

nico at detritus:~/travail/essai_metapost$ mpost -tex=latex essai.mp
This is MetaPost, Version 0.641 (Web2C 7.4.5)
(essai.mp (/usr/local/share/texmf/metapost/courbes.mp/usr/bin/makempx:
Command failed: latex mpxerr.tex; see mpxerr.log

>> /usr/local/share/texmf/metapost/courbes.mp
>> courbes.mpx
! Unable to make mpx file.
l.59         label.bot(btex
                            $+1$ etex,(_ox+_ux,_oy-_largeur_marques));
Transcript written on essai.log.
nico at detritus:~/travail/essai_metapost$ ls -l
total 20
-rw-r--r--  1 nico nico  576 2006-03-12 18:12 essai.log
-rw-r--r--  1 nico nico  174 2006-03-12 18:12 essai.mp
-rw-r--r--  1 nico nico  452 2006-03-12 18:12 mpx2144.dvi
-rw-r--r--  1 nico nico 1627 2006-03-12 18:12 mpxerr.log
-rw-r--r--  1 nico nico  455 2006-03-12 18:12 mpxerr.tex
nico at detritus:~/travail/essai_metapost$ mpost -tex=tex essai.mp
This is MetaPost, Version 0.641 (Web2C 7.4.5)
(essai.mp (/usr/local/share/texmf/metapost/courbes.mp)/usr/bin/makempx:
Command failed: tex mpxerr.tex; see mpxerr.log

>> essai.mp
>> essai.mpx
! Unable to make mpx file.
l.9   label.llft(btex
                      O etex,(2cm,0cm));
Transcript written on essai.log.
nico at detritus:~/travail/essai_metapost$ ls -l
total 28
-rw-r--r--  1 nico nico 1335 2006-03-12 18:13 courbes.mpx
-rw-r--r--  1 nico nico  505 2006-03-12 18:13 essai.log
-rw-r--r--  1 nico nico  174 2006-03-12 18:12 essai.mp
-rw-r--r--  1 nico nico  452 2006-03-12 18:12 mpx2144.dvi
-rw-r--r--  1 nico nico  300 2006-03-12 18:13 mpx2172.dvi
-rw-r--r--  1 nico nico  855 2006-03-12 18:13 mpxerr.log
-rw-r--r--  1 nico nico  168 2006-03-12 18:13 mpxerr.tex
nico at detritus:~/travail/essai_metapost$ mpost -tex=latex essai.mp
This is MetaPost, Version 0.641 (Web2C 7.4.5)
(essai.mp (/usr/local/share/texmf/metapost/courbes.mp) [1] )
1 output file written: essai.1
Transcript written on essai.log.
nico at detritus:~/travail/essai_metapost$
*************************** end of example ****************************** 

So you see my problem : if I compile a metapost file needing LaTeX but no
external file, I have no problem. But if I have to include an external
macro file (courbes.mp, not used, just inserted), I can't have a build
first time. Then I compile it with the tex flag set to tex (can't
compile, because I have LaTeX code inside essai.mp). Another compilation
with the tex flag correctly set, and it compiles fine !

This is the only trick I found working out this problem : compiling with
tex, then back to latex. The messages in mpxerr.log state a .aux file
problem, but I can't find what.

So please, help me, this is definitly consuming too much of my brain.

\bye

-- 

                   Nicolas FRANCOIS
            http://nicolas.francois.free.fr
 A TRUE Klingon programmer does NOT comment his code



More information about the metapost mailing list