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))
FileName const fn = FileName(makeAbsPath(tmp));
ifstream ifs(fn.toFilesystemEncoding().c_str());
bool fle_style = false;
- static regex file_line_error(".+\\.\\D+:[0-9]+: (.+)");
- static regex child_file(".*([0-9]+[A-Za-z]*_.+\\.tex).*");
+ static regex const file_line_error(".+\\.\\D+:[0-9]+: (.+)");
+ static regex const child_file(".*([0-9]+[A-Za-z]*_.+\\.tex).*");
// Flag for 'File ended while scanning' message.
// We need to wait for subsequent processing.
string wait_for_error;
// 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;
// (and in addition to those above)
if (regex_match(token, sub, reg5)) {
// search for strings in <...>
- static regex reg5_1("<([^>]+)(.)");
+ static regex const reg5_1("<([^>]+)(.)");
fragment_pos = iterateLine(token, reg5_1, ">",
fragment_pos, head);
fragment = (fragment_pos != -1);
// where "File: file.ext" would be skipped
if (regex_match(token, sub, reg6)) {
// search for strings in (...)
- static regex reg6_1("\\(([^()]+)(.)");
+ static regex const reg6_1("\\(([^()]+)(.)");
fragment_pos = iterateLine(token, reg6_1, ")",
fragment_pos, head);
fragment = (fragment_pos != -1);