]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeX.cpp
Make the non-drawing cases faster in TextMetrics::drawParagraph
[lyx.git] / src / LaTeX.cpp
index e6a185c6beb23d3f809fc996287f9ad685840473..0640275a36497a4dc8eea3d8c3edfae667ae3d8b 100644 (file)
@@ -148,6 +148,10 @@ void LaTeX::removeAuxiliaryFiles() const
        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();
 }
@@ -232,12 +236,13 @@ int LaTeX::run(TeXErrors & terr)
        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);
        }
 
@@ -950,8 +955,7 @@ bool handleFoundFile(string const & ff, DepTable & head)
                                        return true;
                                // strip off part after last space and try again
                                string tmp = strippedfile;
-                               string const stripoff =
-                                       rsplit(tmp, strippedfile, ' ');
+                               rsplit(tmp, strippedfile, ' ');
                                absname.set(strippedfile);
                                if (insertIfExists(absname, head))
                                        return true;
@@ -976,8 +980,7 @@ bool handleFoundFile(string const & ff, DepTable & head)
                                break;
                        // strip off part after last space and try again
                        string strippedfile;
-                       string const stripoff =
-                               rsplit(foundfile, strippedfile, ' ');
+                       rsplit(foundfile, strippedfile, ' ');
                        foundfile = strippedfile;
                        onlyfile = onlyFileName(strippedfile);
                        absname = makeAbsPath(onlyfile);