I'm not good at regexes, but I tried to fix the assert by fixing the regex that scans filenames in the logfile.
By now, everything inside brackets has been passed as file name (which is a lot). As soon as a LaTeX command with a backslash was passed, the assertion triggered. I have added the following conditions that all seem valid to me: - backslash must not occur (are there some \string uses in filenames?) - a dot must occur (LaTeX always outputs the extensions AFAICS, so this avoids a lot of rubbish) - blanks must not occur (I'm not sure about this. Blanks in filenames are replaced by underbar here, so they still work -- is this always the case? I need to test for blanks, because there are lines like this in the log file: ] (./EmbeddedObjects.ind [75] [76 without the test, such files are not found Please have a look if the regex makes sense (works for me for both test cases). Furthermore, I have noticed that the regex always stops at line breaks, so long file names that are broken accross lines are not parsed correctly. This happens at least for the following regex: static regex reg2("File: ([^ ]+).*"); Any idea about this? Jürgen
Index: src/LaTeX.C =================================================================== --- src/LaTeX.C (Revision 17136) +++ src/LaTeX.C (Arbeitskopie) @@ -753,6 +753,7 @@ } string const onlyfile = onlyFilename(foundfile); + lyxerr << ">>>>> onlyfile: " << onlyfile << endl; FileName const absname(makeAbsPath(onlyfile)); // (2) foundfile is in the tmpdir @@ -844,7 +845,9 @@ token = to_utf8(from_filesystem8bit(token)); if (regex_match(token, sub, reg1)) { - static regex reg1_1("\\(([^()]+)"); + // search for strings in (...) that must not contain '\' + // or a blank, but must contain a dot + static regex reg1_1("\\(([^ ()\\\\]+\\.+[^ ()\\\\]+)"); smatch what; string::const_iterator first = token.begin(); string::const_iterator end = token.end();