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

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

Why not let the script/makefile that calls rubber test whether the first
non-comment line is [[:space:]]*\documentclass{.*}, and whether there is
a line [[:space:]]*\begin{document}?  In fact it is not necessary that
the documentclass is specified in the first line, but everything else is
pretty uncommon.

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

If that is your intention, you could try to grep for ^! in the log file;
this indicates that there is some error, which usually should be fixed
by the authors.  Only if you are using pdflatex and do not remove
intermediate files between runs, their might be bogus errors.

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




Reply to: