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

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



Hilmar Preusse writes:
> On 03.08.04 Benjamin BAYART (bayartb@sitadelle.com) wrote:

>> tex --parse-first-line works fine up to version 2.0.2-16, and
>> does not work anymore since 2.0.2-17.
[...]

> Could you give us a little example, how such a file could look like
> you want to compile here?

An example would be the sample2e.tex file, with a line containing just
"%&latex" prepended.

Why -parse-first-line seems to be sometimes working, sometimes not in
this case is not clear to me.

The switch to using (pdf)etex as the engine for latex does affect what
happens when -parse-first-line is used, and the engines in the current
teTeX-beta will at least provide a usable diagnostic.

$ head sample2e.tex
%&latex
% This is a sample LaTeX input file.  (Version of 11 April 1994.)
%
% A '%' character causes TeX to ignore all remaining text on the line,
% and is used for comments like this one.

\documentclass{article}      % Specifies the document class

                             % The preamble begins here.
\title{An Example Document}  % Declares the document's title.
$ tex -parse-first-line sample2e.tex
This is TeXk, Version 3.141592 (Web2C 7.5.3)
 %&-line parsing enabled.
---! /var/lib/texmf/web2c/latex.fmt was written by pdfetex
(Fatal format file error; I'm stymied)
$ etex -parse-first-line sample2e.tex
This is e-TeXk, Version 3.141592-2.1 (Web2C 7.5.3)
 %&-line parsing enabled.
---! /var/lib/texmf/web2c/latex.fmt was written by pdfetex
(Fatal format file error; I'm stymied)
$ pdfetex -parse-first-line sample2e.tex
This is pdfeTeXk, Version 3.141592-1.20a-rc4-2.1 (Web2C 7.5.3)
 %&-line parsing enabled.
output format initialized to DVI
entering extended mode
(./sample2e.tex
LaTeX2e <2003/12/01>
Babel <v3.8c> and hyphenation patterns for english, french, german, ngerman, ca
talan, croatian, czech, danish, dutch, estonian, finnish, greek, hungarian, ita
lian, latin, mongolian, norwegian, polish, portuguese, romanian, russian, slove
ne, slovak, spanish, swedish, ukenglish, ukrainian, welsh, dumylang, nohyphenat
ion, loaded.
(/usr/local/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
(/usr/local/share/texmf-dist/tex/latex/base/size10.clo)) (./sample2e.aux)
(/usr/local/share/texmf-dist/tex/latex/base/omscmr.fd) [1] [2] [3]
(./sample2e.aux) )
Output written on sample2e.dvi (3 pages, 7256 bytes).
Transcript written on sample2e.log.



A note to the debian maintainers: if you're going to use etex as the
engine for latex, consider taking the makempx script from the current
teTeX-beta; the script was modified so that if there is a "%&format"
line it will use "format" for the TeX command instead of just "tex".
This allows the common case "%&latex" work.  As long as fmtutil is
used to generate the formats, the existence of symlinks from format
name to their proper engine is also guaranteed.

>> Moreover, this option (--parse-first-line) seems to be activated as
>> a default (was not in 2.0.2-5.1, but is in 2.0.2-16 and 2.0.2-17)
>> which seems weird (and is close to violating TeX's license since
>> the behaviour is modified without modifying the name).

> Sorry, I've never used that option. The only invasive influence to
> the TeX compiler we did between -16 an -17 when we started calling
> eTeX to process LaTeX files.

When options like -parse-first-line are enabled (and regardless of
_how_ they are enabled) the following happens:

- In the main banner line, a 'k' is appended to engine name.
- An additional banner line is printed.

Compare

	This is TeX, Version 3.141592 (Web2C 7.5.3)
	...

and

	This is TeXk, Version 3.141592 (Web2C 7.5.3)
	 %&-line parsing enabled.

We (upstream) believe this satisfies the TeX license requirements (we
don't falsely pretend to be TeX) without impeding usability (the name
of the command remains 'tex', which we believe is not an issue as the
license is agnostic w.r.t. how TeX is to be invoked).

-- 
Olaf Weber

               (This space left blank for technical reasons.)




Reply to: