I would like to extract latex errors in a given log file (in LaTeX). Unfortunately, I have no idea how to extract them reliably, so for now I just take all lines starting with a ! , but is is not very robust. For instance if the error is a \foo that is not defined, I will only see:
! Undefined control sequence.
! ==> Fatal error occurred, no output PDF file
produced!
but I will not know that it is a \foo that is missing.
Similarly, if the error is a LaTeX3 error on multiline like
! Package robExt Error: Here are some long
(robExt) errors that span multiple lines.
I will only see the first line !Package robExt Error: Here are some long, not very helpful sometimes.
Is there a robust to know when to start, and when to stop?
!to one starting?but for example--file-line-errorcomplicates that. – David Carlisle Dec 21 '23 at 18:02texlogfilter? – egreg Dec 21 '23 at 18:19grep -2 ! foo.log > foo.tex– Fran Dec 31 '23 at 20:59