X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLaTeX.cpp;h=db2037f8d2f4edeca588dfc09aa257998ad40f2d;hb=2098f1d8c20d51e63e670bcdc9da8996068975bf;hp=6bd55e8216af6127564548b8812c52ccc9188117;hpb=c52bd08442214e4d768ee73886dee68e2b812cd1;p=lyx.git diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp index 6bd55e8216..db2037f8d2 100644 --- a/src/LaTeX.cpp +++ b/src/LaTeX.cpp @@ -50,8 +50,6 @@ namespace os = support::os; // different way. // - the makeindex style files should be taken care of with // the dependency mechanism. -// - makeindex commandline options should be supported -// - somewhere support viewing of bibtex and makeindex log files. // - we should perhaps also scan the bibtex log file namespace { @@ -148,7 +146,7 @@ int LaTeX::run(TeXErrors & terr) // We know that this function will only be run if the lyx buffer // has been changed. We also know that a newly written .tex file // is always different from the previous one because of the date - // in it. However it seems safe to run latex (at least) on time + // in it. However it seems safe to run latex (at least) one time // each time the .tex file changes. { int scanres = NO_ERRORS; @@ -412,14 +410,22 @@ int LaTeX::startscript() bool LaTeX::runMakeIndex(string const & f, OutputParams const & runparams, string const & params) { - LYXERR(Debug::LATEX, - "idx file has been made, running makeindex on file " << f); string tmp = runparams.use_japanese ? lyxrc.jindex_command : lyxrc.index_command; + + if (!runparams.index_command.empty()) + tmp = runparams.index_command; + + LYXERR(Debug::LATEX, + "idx file has been made, running index processor (" + << tmp << ") on file " << f); tmp = subst(tmp, "$$lang", runparams.document_language); - if (runparams.use_indices) + if (runparams.use_indices) { tmp = lyxrc.splitindex_command + " -m " + quoteName(tmp); + LYXERR(Debug::LATEX, + "Multiple indices. Using splitindex command: " << tmp); + } tmp += ' '; tmp += quoteName(f); tmp += params; @@ -565,6 +571,9 @@ bool LaTeX::runBibTeX(vector const & bibtex_info, string tmp = runparams.use_japanese ? lyxrc.jbibtex_command : lyxrc.bibtex_command; + + if (!runparams.bibtex_command.empty()) + tmp = runparams.bibtex_command; tmp += " "; // onlyFilename() is needed for cygwin tmp += quoteName(onlyFilename(removeExtension( @@ -661,7 +670,9 @@ int LaTeX::scanLogFile(TeXErrors & terr) retval |= RERUN; } } else if (prefixIs(token, "! ") - || (fle_style && regex_match(token, sub, file_line_error))) { + || (fle_style + && regex_match(token, sub, file_line_error) + && !contains(token, "pdfTeX warning"))) { // Ok, we have something that looks like a TeX Error // but what do we really have. @@ -780,12 +791,13 @@ bool handleFoundFile(string const & ff, DepTable & head) // (1) foundfile is an // absolute path and should // be inserted. - FileName absname(foundfile); - if (absname.isAbsolute()) { + FileName absname; + if (FileName::isAbsolute(foundfile)) { LYXERR(Debug::DEPEND, "AbsolutePath file: " << foundfile); // On initial insert we want to do the update at once // since this file cannot be a file generated by // the latex run. + absname.set(foundfile); if (!insertIfExists(absname, head)) { // check for spaces string strippedfile = foundfile; @@ -1014,7 +1026,7 @@ void LaTeX::deplog(DepTable & head) // where "File: file.ext" would be skipped if (regex_match(token, sub, reg6)) { // search for strings in (...) - static regex reg6_1("\\(([^()]+)(.).*"); + static regex reg6_1("\\(([^()]+)(.)"); smatch what; string::const_iterator first = token.begin(); string::const_iterator end = token.end();