]> git.lyx.org Git - lyx.git/commit
Improve log scanner to correctly report error
authorScott Kostyshak <skostysh@lyx.org>
Sat, 21 Feb 2015 05:00:51 +0000 (00:00 -0500)
committerScott Kostyshak <skostysh@lyx.org>
Fri, 20 Mar 2015 06:19:44 +0000 (02:19 -0400)
commit0a6120cb7f940bc010efa9f2873afaeee6381a9e
tree0e271e96e5a82580306f2bea81f5fa27c5cbffea
parent1dbf0e5aab732bdba4eed1af2866c357bc30a526
Improve log scanner to correctly report error

When scanning the LaTeX log, previously we only looked ahead 10 lines
after a "!" line and if we did not find a line number we did not count
an error. This lead to the problem that templates/ACM-sigplan.lyx was
showing a successful export and the PDF was shown (it is still
created despite the error). Now that the exit code of the latex
command is checked (as of the previous commit), an error is correctly
given, but by parsing the log better with this commit, a more
informative error is given.

Increasing the look-ahead to 15 lines leads to correct parsing of
the ACM-sigplan log. The excerpt in the log file where there are more
than 10 lines in-between the "!" line and the line number is below:

! Undefined control sequence.
\@toappear ...ent http://dx.doi.org/10.1145/\@doi

<argument> ...n is removed.]\par \else \@toappear
                                                  \fi \if \@reprint
\noinden...

\@begin@tempboxa ...mpboxa #1{\color@begingroup #2
                                                  \color@endgroup }\def
\wid...

\@iiiparbox ...tempdima \@parboxrestore #5\@@par }
                                                  \ifx \relax #2\else
\setle...

\@copyrightspace ...planconf@finalpage}.\par \fi }
                                                  }\end@float
\maketitle ... \@copyrightwanted \@copyrightspace
                                                  \fi
l.34 \maketitle

Another example is posted here:
http://tex.stackexchange.com/questions/231655/lyx-cannot-output-to-pdflatex-for-a-specific-file
src/LaTeX.cpp