[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.



On Tue, Aug 02, 2005 at 12:05:19PM +0200, Frank Küster wrote:
> Hi Bas,
> 
> Bas Kloet <bas@luon.net> wrote:
> 
> It is the other way round: latex loads the LaTeX format before your
> file, and in this format various things are done, including page setup.
> It is not something that is implemented in tex, but rather what is
> missing in the plain format - no page setup - that results in no dvi/pdf
> file being produced.  Again, we would have to take away from LaTeX
> exactly what makes that LaTeX is LaTeX to get the "wanted" behavior.

Ok, you know a lot more of the implementation of LaTeX then I do, so
I'll just have to accept that this problem can not be (easily) solved.

> 
> I suggest not to use scripts like rubber early in the development cycle,
> but rather something that shows you the errors.  This could be running
> latex on the command line, or AUCTeX in Emacs.  Both would have shown
> you the error message "missing \begin{document}" even before you'd
> removed "useless cruft" like \documentclass...
...
> What's the problem with having an unreadable file around, when you have
> to go debugging, anyway?  I'd rather not have rubber remove the output
> file upon every error - some (actually most) TeX errors are all but
> fatal, and you can very well work with the output file.  And there's no
> way for rubber to discriminate between them.

The main problem I have is that we use rubber in an automated build
system, with LaTeX code provided by a large number of different authors.
A lot of these LaTeX documents consist of a main file and a number of
included files. It is our policy that included files end with .tex.inc to make
sure our system doesn't try to build them, but sometimes people forget that
and call the included file(s) something.tex as well. This is something
that we'd of course like to detect and warn the author about.

The current problem we have is that rubber will happily create a pdf
file for this (included) LaTeX file (which of course misses
\begin{document}, etc) if it contains a \newpage and exits with error
code 0 even though there were a lot of LaTeX (not just TeX) errors and a
completely useless pdf file was produced.  This makes it (almost)
impossible for our system to detect that something went wrong, so we
can't inform the author of the problem.

Greetings,
Bas Kloet




Reply to: