Background:
I have numerous individual files that need to be compiled, so am using a script to do that with the following options:
set PDFLATEX_OPTIONS = " --file-line-error --shell-escape --synctex=1 --interaction=nonstopmode --recorder "
as I don't want compilation to terminate just because there is an error in one file.
Intro:
I would like my script to detect which files totally failed to produce useful results. At this time, I am not too concerned with slight overfull/underfull box reports, but trying to focus on the ones that must be fixed (as opposed those that should be fixed).
For conditions that are specific to my own use case, I have put as much error detection as possible and write to the log file very specific error messages which my script can detect and report any problems. This process has worked great until I recently came across an issue where some PDF files were not produced at all due to a change in my common .sty
files. Well, that was an easy fix, I just use:
grep "no output PDF file produced"
and test the return code to detect this failure. But this got me thinking, which is always a bad sign :-), that perhaps there might be some case where that message is not generated, but the PDF file does not contain any content, or there are other catastrophic failures that can occur.
Question:
What I am looking for are recommendations on specific error messages to look for in the log files, or automate-able tests that should be performed to minimize the chance of a some extremely important failure being overlooked.
And even tough I am mainly concerned with what must be fixed, at some point I will need to look at the should be fixed category also. For example, at some point an overfull box warning is really a must be fixed. Any suggestions on these would also be useful.
Notes:
- Perhaps I should just be looking at the return code from
pdflatex
instead of specific error messages, but I think it would be more useful to be able to categorize the failures so that I can prioritize. This question isn't about things that can be detected via the
nag
package for instance as discussed inI am using as much of that kind of detection that I am aware of, and I review the PDF file at the time of creation to make sure it looks reasonable, but can't be looking at every PDF every time I change the
.sty
files.
pdflatex
returns useful error codes apart from 0 and 1. However you're contradicting yourself: you give the-halt-on-error
and say you don't want to stop just because of an error.texfot
? It is designed torun TeX, filtering online transcript for interesting messages
(from the man page). This might make it easier togrep
effectively by reducing the initial size of output to be filtered.texfot
, but does look interesting. Will have to try it out.