[tex-live] %&latex and metapost using TL 2003

Olaf Weber olaf at infovore.xs4all.nl
Fri May 28 18:48:51 CEST 2004


Lars Madsen writes:
> Vladimir Volovich :

>>> Is there no way of getting back to the old behavior, that is
>>> metapost actually understanding the &latex line?

>> Change the line in texmf.cnf:
>> 	parse_first_line = f
>> to
>> 	parse_first_line = t

> It is set to t already

> And in makempx it says

> : ${TEX='tex --parse-first-line'}

metapost doesn't understand the &latex line, tex does.  So what
happens what you do "tex --parse-first-line  mpxerr.tex"?  I'm betting
this:

	infovore:/tmp$ tex --parse-first-line  mpxerr.tex
	This is TeXk, Version 3.141592 (Web2C 7.5.3)
	 %&-line parsing enabled.
	---! /usr/local/share/texmf/web2c/etex/latex.fmt was written by etex
	(Fatal format file error; I'm stymied)

though likely without the helpful '---!' message if you're using older
binaries.

We probably ought to do is change 'makempx' to get the %& line out and
use the command it finds there.  Something like this might do:

Index: makempx.in
===================================================================
RCS file: /usr/local/cvsroot/texk/texk/web2c/mpware/makempx.in,v
retrieving revision 1.12
diff -u -d -r1.12 makempx.in
--- a/makempx.in	16 Apr 2004 09:51:42 -0000	1.12
+++ b/makempx.in	28 May 2004 16:34:27 -0000
@@ -15,7 +15,6 @@
 : ${MPTOTEX='mpto -tex'}
 : ${MPTOTR='mpto -troff'}
 : ${NEWER=newer}
-: ${TEX='tex --parse-first-line'}
 : ${TROFF='eqn -Tpost -d\$\$ | troff -Tpost'}
 
 # convert relative path to absolute in $MAKEMPX_BINDIR:
@@ -125,6 +124,10 @@
       mv mpx$$.tmp mpx$$.tex
     fi
 
+    test -z "$TEX" && \
+      TEX=`sed -n '1s/%\&[ 	]*\([^ 	
]*\).*$/\1 --parse-first-line/p;q'`
+    test -z "$TEX" && TEX='tex --parse-first-line'
+
     if $TEX --interaction=batchmode mpx$$.tex </dev/null >/dev/null; then
       WHATEVER_TO_MPX="$DVITOMP"
       INFILE=mpx$$.dvi


The sed expression does the following: Check if the first line starts
with %& and matches %&<whitespace>NAME<...>, in which case we set TEX
to 'NAME --parse-first-line' (there might be more options that we
didn't copy out).

If TEX is still empty after that, use the default value.

makempx.c will have to be updated as well.  :-(

-- 
Olaf Weber

               (This space left blank for technical reasons.)



More information about the tex-live mailing list