]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeX.cpp
Harmonize naming
[lyx.git] / src / LaTeX.cpp
index 22a3a97d465022849fc0568923f635344a4b57d0..e4a23af117be4ede11a6b46d2b12e3bcec9d86a7 100644 (file)
@@ -268,7 +268,12 @@ int LaTeX::run(TeXErrors & terr)
                                runparams);
        }
        FileName const nlofile(changeExtension(file.absFileName(), ".nlo"));
-       if (head.haschanged(nlofile))
+       // If all nomencl entries are removed, nomencl writes an empty nlo file.
+       // DepTable::hasChanged() returns false in this case, since it does not
+       // distinguish empty files from non-existing files. This is why we need
+       // the extra checks here (to trigger a rerun). Cf. discussions in #8905.
+       // FIXME: Sort out the real problem in DepTable.
+       if (head.haschanged(nlofile) || (nlofile.exists() && nlofile.isFileEmpty()))
                rerun |= runMakeIndexNomencl(file, ".nlo", ".nls");
        FileName const glofile(changeExtension(file.absFileName(), ".glo"));
        if (head.haschanged(glofile))
@@ -811,9 +816,11 @@ int LaTeX::scanLogFile(TeXErrors & terr)
                                // we have a latex error
                                retval |=  TEX_ERROR;
                                if (contains(desc,
-                                   "Package babel Error: You haven't defined the language") ||
-                                   contains(desc,
-                                   "Package babel Error: You haven't loaded the option"))
+                                       "Package babel Error: You haven't defined the language")
+                                   || contains(desc,
+                                       "Package babel Error: You haven't loaded the option")
+                                   || contains(desc,
+                                       "Package babel Error: Unknown language"))
                                        retval |= ERROR_RERUN;
                                // get the line number:
                                int line = 0;