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

Bug#320821: tetex-bin: Latex sometimes produces (useless) dvi files for broken tex files.



Bas Kloet <bas@luon.net> wrote:

> Package: tetex-bin
> Version: 2.0.2-31
> Severity: normal
>
>
> If you run latex on a malformed tex file that consists of some text,
> followed by a '\newpage' and optionally followed by some more text, then
> latex will fail (obviously), but it will still produce a (very much broken)
> dvi file. This file is useless and can produce strange results in scripts
> like rubber.
>
> Example file contents:
>
> --------------------
> Moo
> \newpage
> --------------------
>
> Latex manages to produce a dvi file from this.

TeX is a turing-complete programming language, and LaTeX is just a
user-friendly frontend providing logical markup, while still allowing to
use all of TeX's Super Cow powers directly.  

You cannot stop this "document" from producing a dvi file, unless you
change the bowels of the TeX language, which will probably not even
happen if some day people in fact manage a complete rewrite of TeX, as
is currently planned.

I am quite sure you can produce equally useless binaries with a
compiler, if you put enough effort in writing carefully designed
nonsense in the source code, and you wouldn't blame the compiler.

I don't think this is a bug - at most it is a missing feature.  It might
be a good idea if frontends would do some basic sanity checks; but
you'll never be able to catch all errors.  And anyway, it's much easier
to find your mistake if you fed something that isn't LaTeX at all to
rubber, and get an empty dvi file, than if you made a subtle mistake in
a otherwise well-formed and maybe sophisticated LaTeX input file,
resulting in printing of all italics in 9pt from page 32 onwards...


Regards, Frank
-- 
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer




Reply to: