+2001-07-02 Claus Hentschel <claus.hentschel@mbau.fh-hannover.de>
+
+ * LaTeX.C (deplog): add another regex for MikTeX
+
2001-10-05 Adrien Rebollo <adrien.rebollo@gmx.fr>
* lyxrc.C (set_font_norm_type): support iso8859-3
#endif
#include <fstream>
-#include "support/filetools.h"
#include "LaTeX.h"
+#include "support/filetools.h"
+#include "support/os.h"
#include "support/FileInfo.h"
#include "debug.h"
#include "support/lyxlib.h"
LRegex reg2("File: ([^ ]+).*");
LRegex reg3("No file ([^ ]+)\\..*");
LRegex reg4("\\\\openout[0-9]+.*=.*`([^ ]+)'\\..*");
+ // If an index should be created, MikTex does not write a line like
+ // \openout# = 'sample,idx'.
+ // but intstead only a line like this into the log:
+ // Writing index file sample.idx
+ LRegex reg5("Writing index file ([^ ]+).*");
LRegex unwanted("^.*\\.(aux|log|dvi|bbl|ind|glo)$");
ifstream ifs(logfile.c_str());
LRegex::SubMatches const & sub = reg4.exec(token);
foundfile = LSubstring(token, sub[1].first,
sub[1].second);
+ } else if (reg5.exact_match(token)) {
+ LRegex::SubMatches const & sub = reg5.exec(token);
+ foundfile = LSubstring(token, sub[1].first,
+ sub[1].second);
} else {
continue;
}
+ // convert from native os path to unix path
+ foundfile = os::internal_path(foundfile);
+
lyxerr[Debug::DEPEND] << "Found file: "
<< foundfile << endl;
lyxerr[Debug::LATEX] << "kpse status = " << c.first << "\n"
<< "kpse result = `" << strip(c.second, '\n')
<< "'" << endl;
+ string fullpath;
if (c.first != -1)
- return strip(strip(c.second, '\n'), '\r');
+ fullpath = os::internal_path(strip(strip(c.second,
+ '\n'),
+ '\r'));
else
return string();
}