Rerun makeindex if all nomencl entries have been removed (#8905)

This commit is contained in:
Juergen Spitzmueller 2013-12-02 14:35:42 +01:00
parent 6a8269033b
commit b6b1ab890d
2 changed files with 8 additions and 2 deletions

View File

@ -269,7 +269,12 @@ int LaTeX::run(TeXErrors & terr)
runparams); runparams);
} }
FileName const nlofile(changeExtension(file.absFileName(), ".nlo")); 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"); rerun |= runMakeIndexNomencl(file, ".nlo", ".nls");
FileName const glofile(changeExtension(file.absFileName(), ".glo")); FileName const glofile(changeExtension(file.absFileName(), ".glo"));
if (head.haschanged(glofile)) if (head.haschanged(glofile))

View File

@ -52,6 +52,7 @@ What's new
* DOCUMENT INPUT/OUTPUT * DOCUMENT INPUT/OUTPUT
- Rerun makeindex if all nomencl entries have been removed (bug 8905).
* USER INTERFACE * USER INTERFACE
@ -63,7 +64,7 @@ What's new
- Fix crash with changetracking in bibliography environment (bug 8646). - Fix crash with changetracking in bibliography environment (bug 8646).
- Fix crash when optional argument inside inside a math macro was deleted (bug 8329). - Fix crash when optional argument inside a math macro was deleted (bug 8329).
- Fix problem that led to assertion in some cases when space was at - Fix problem that led to assertion in some cases when space was at
beginning of line (bugs 8838 and 8947). beginning of line (bugs 8838 and 8947).