[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#263296: tetex-bin 2.0.2-17 broke "tex --parse-first-line"



Hilmar Preusse <hille42@web.de> writes:

> If you use plain TeX (which is not yet e-TeX) with the option
> --parse-first-line and call there other formats than plain TeX make
> sure you've create the appropriate format files using Knuth TeX.
> I.e.:
> $format		tex	pattern-file		arguments
> e.g. for LaTeX this reads:
> latex		tex	language.dat		latex.ini
> in /etc/texmf/fmt.d/00tetex.cnf. This is not necessary for a normal
> LaTeX call but for that special case.
>
> we could put this entry already in fmtutil.cnf. That would make the
> makempx.in.diff surplus and we can call Knuth TeX in case of
> --parse-first-line . Same for pdfLaTeX.

Hi, I am a little confused by the above so I offer the following mush
longer explanation. (I have not upgraded to -17 yet, I'm still on
-5.1!) and I never use --parse-first-line so i cannot check all the
details).

I am also unsure as to how this effects people who use mylatex.ltx.

[Presently I always call elatex/etex explicitly; I generate the
mylatex.efmt format with einitex (instead of initex), and then compile
the documents with etex instead of tex.  But most people using
mylatex.ltx will have been using Knuth's initex and tex, so what, if
anything, will they need to do differently? It might be nice to add a
section for them, I think.  Possibly mylatex.ltx should be updated as
well]



---- Possible addition to News.Debian ---------------------------------
The last section can be ignored by most people, it is only for those
who do more advanced things with format files.

If you wish to compile documents by saying

  tex --parse-first-line file.tex

where file.tex's first line is "%&$format" and "$format" is something
that will now, by default, be compiled with the etex(1) engine instead
of Knuth's tex(1) [for example $format might be "latex" or "pdflatex",
but not "plain"] then you need to ensure /etc/texmf/fmt.d/00tetex.cnf
contains lines of the form

  $format engine   pattern-file  arguments

So, for a file.tex starting "%&latex" you add

  latex   tex   language.dat  latex.ini

Alternatively, just compile the file with etex

  etex --parse-first-line file.tex

and compile the file with etex(1) instead of Knuth's tex(1).  Similar
comments apply to the case where engine is Knuth's pdftex(1) or
amstex(1).

Note that all of this section is irrelevent for people who only
compile file.tex by saying

  latex file.tex

The reason is that since latex documents are now compiled by e-TeX's
etex compiler instead of Knuth's tex, the "latex" format is created by
einitex(1) instead of Knuth's initex(1), which confuses Knuth's tex.

The lines added to 00tetex.cnf tell Knuth's tex to use a latex.fmt
created by Knuth's initex (which it can read) instead of the elatex
format latex.efmt (which it cannot).

Again, most people need not do anything, and everything will compile as
it always has done.
--------- end --------------------------------------------------------



Reply to: