From b6b1ab890d99390ecf677c58d18f6814d3ffefb6 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Mon, 2 Dec 2013 14:35:42 +0100 Subject: [PATCH] Rerun makeindex if all nomencl entries have been removed (#8905) --- src/LaTeX.cpp | 7 ++++++- status.20x | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp index dcb1ccee44..39eb54bf13 100644 --- a/src/LaTeX.cpp +++ b/src/LaTeX.cpp @@ -269,7 +269,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)) diff --git a/status.20x b/status.20x index d7e0ca6b59..3e38d898fd 100644 --- a/status.20x +++ b/status.20x @@ -52,6 +52,7 @@ What's new * DOCUMENT INPUT/OUTPUT +- Rerun makeindex if all nomencl entries have been removed (bug 8905). * USER INTERFACE @@ -63,7 +64,7 @@ What's new - 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 beginning of line (bugs 8838 and 8947).