X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLaTeX.cpp;h=1910b1dc7a7c317f77f9549bad4d5109b86ad10c;hb=821e2764074c58791988e220ffa774fea926959a;hp=351f6071d30fe7472fea1f7fc7846042d02a2301;hpb=f07105d0e5d7feea9a09abea413bfd5d4d059108;p=lyx.git diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp index 351f6071d3..1910b1dc7a 100644 --- a/src/LaTeX.cpp +++ b/src/LaTeX.cpp @@ -17,15 +17,15 @@ #include "BufferList.h" #include "LaTeX.h" -#include "gettext.h" #include "LyXRC.h" -#include "debug.h" #include "DepTable.h" -#include "support/filetools.h" +#include "support/debug.h" #include "support/convert.h" +#include "support/FileName.h" +#include "support/filetools.h" +#include "support/gettext.h" #include "support/lstrings.h" -#include "support/lyxlib.h" #include "support/Systemcall.h" #include "support/os.h" @@ -36,40 +36,11 @@ using boost::regex; using boost::smatch; -#ifndef CXX_GLOBAL_CSTD -using std::sscanf; -#endif - -using std::endl; -using std::getline; -using std::string; -using std::ifstream; -using std::set; -using std::vector; - +using namespace std; +using namespace lyx::support; namespace lyx { -using support::absolutePath; -using support::bformat; -using support::changeExtension; -using support::contains; -using support::FileName; -using support::findtexfile; -using support::getcwd; -using support::makeAbsPath; -using support::onlyFilename; -using support::prefixIs; -using support::quoteName; -using support::removeExtension; -using support::rtrim; -using support::rsplit; -using support::split; -using support::subst; -using support::suffixIs; -using support::Systemcall; -using support::trim; - namespace os = support::os; // TODO: in no particular order @@ -188,7 +159,7 @@ int LaTeX::run(TeXErrors & terr) bool rerun = false; // rerun requested // The class LaTeX does not know the temp path. - theBufferList().updateIncludedTeXfiles(getcwd().absFilename(), + theBufferList().updateIncludedTeXfiles(FileName::getcwd().absFilename(), runparams); // Never write the depfile if an error was encountered. @@ -623,6 +594,12 @@ int LaTeX::scanLogFile(TeXErrors & terr) if (contains(token, "Rerun to get cross-references")) { retval |= RERUN; LYXERR(Debug::LATEX, "We should rerun."); + // package clefval needs 2 latex runs before bibtex + } else if (contains(token, "Value of") + && contains(token, "on page") + && contains(token, "undefined")) { + retval |= ERROR_RERUN; + LYXERR(Debug::LATEX, "Force rerun."); } else if (contains(token, "Citation") && contains(token, "on page") && contains(token, "undefined")) { @@ -774,12 +751,12 @@ bool handleFoundFile(string const & ff, DepTable & head) // (1) foundfile is an // absolute path and should // be inserted. - if (absolutePath(foundfile)) { + FileName absname(foundfile); + if (absname.isAbsolute()) { 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. - FileName absname(foundfile); if (!insertIfExists(absname, head)) { // check for spaces string strippedfile = foundfile; @@ -802,7 +779,7 @@ bool handleFoundFile(string const & ff, DepTable & head) } string onlyfile = onlyFilename(foundfile); - FileName absname(makeAbsPath(onlyfile)); + absname = makeAbsPath(onlyfile); // check for spaces while (contains(foundfile, ' ')) {