FileName const aux(changeExtension(file.absFileName(), ".aux"));
aux.removeFile();
+ // Also remove the .out file (e.g. hyperref bookmarks) (#9963)
+ FileName const out(changeExtension(file.absFileName(), ".out"));
+ out.removeFile();
+
// Remove the output file, which is often generated even if error
output_file.removeFile();
}
LYXERR(Debug::LATEX, "Run #" << count);
message(runMessage(count));
- int const exit_code = startscript();
+ int exit_code = startscript();
scanres = scanLogFile(terr);
if (scanres & ERROR_RERUN) {
LYXERR(Debug::LATEX, "Rerunning LaTeX");
- startscript();
+ terr.clearErrors();
+ exit_code = startscript();
scanres = scanLogFile(terr);
}