On Fri, Sep 12, 2014 at 8:53 AM, Scott Kostyshak <[email protected]> wrote: > Systemcall::startscript returns the exit code of the LaTeX command > that is run, but the return value was not being checked by > LaTeX::run. It is now checked and if the exit code is non-zero, > it is returned immediately. > > At a higher level, if the LaTeX command returns a non-zero > exit code, in the GUI a message such as "Error while exporting > format: PDF (LuaTeX)" is given instead of "Successful preview > of format: PDF (LuaTeX)" followed by the attempt to open an > incomplete/missing .pdf file. > > When run on the commandline, lyx -e lualatex example.lyx now > gives "Error: LaTeX failed" and a non-zero exit code where before > it gave a zero exit code. > > Any thoughts? See my other email for a use case. > > Scott
Another use case, that I can reproduce with TeX Live 2013 and 2014 is: 1. Go to File > New From Template and select ACM-sigplan.lyx (2.) You may need to follow the instructions to install the SIGPLAN LaTeX class. 3. View with pdflatex. What happens is that LyX will export the file and say it was successful. A file is actually produced and so the view seems to work. But actually the terminal shows <<'pdflatex "newfile1.tex"' finished with exit code 1>>. With this patch, LyX correctly says that the export failed. Actually, now I realize that this is related to #2757 and has the same potential to annoy users that fixing #2757 did. In fact, assuming bibtex exits with error, this commit would also break compilation for users. Scott
