]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeX.cpp
Cmake build: Creating a define for a header file found
[lyx.git] / src / LaTeX.cpp
index ecd255f4eaec8431c4278006217812407c733f37..a6244863ffc1f1cf985d95faf1b4c41e37f60e42 100644 (file)
@@ -94,7 +94,7 @@ bool operator!=(AuxInfo const & a, AuxInfo const & o)
 
 LaTeX::LaTeX(string const & latex, OutputParams const & rp,
             FileName const & f, string const & p)
-       : cmd(latex), file(f), path(p), runparams(rp)
+       : cmd(latex), file(f), path(p), runparams(rp), biber(false)
 {
        num_errors = 0;
        if (prefixIs(cmd, "pdf")) { // Do we use pdflatex ?
@@ -184,7 +184,7 @@ int LaTeX::run(TeXErrors & terr)
 
        bool had_depfile = depfile.exists();
        bool run_bibtex = false;
-       FileName const aux_file(changeExtension(file.absFileName(), "aux"));
+       FileName const aux_file(changeExtension(file.absFileName(), ".aux"));
 
        if (had_depfile) {
                LYXERR(Debug::DEPEND, "Dependency file exists");
@@ -694,6 +694,10 @@ int LaTeX::scanLogFile(TeXErrors & terr)
                                   && contains(token, "on page")
                                   && contains(token, "undefined")) {
                                retval |= UNDEF_CIT;
+                       } else if (contains(token, "Citation")
+                                  && contains(token, "on input line")
+                                  && contains(token, "undefined")) {
+                               retval |= UNDEF_CIT;
                        }
                } else if (prefixIs(token, "Package")) {
                        // Package warnings
@@ -996,7 +1000,7 @@ bool completeFilename(string const & ff, DepTable & head)
 }
 
 
-int iterateLine(string const token, regex const reg, string const closing,
+int iterateLine(string const token, regex const reg, string const closing,
                int fragment_pos, DepTable & head)
 {
        smatch what;
@@ -1044,7 +1048,7 @@ int iterateLine(string const token, regex const reg, string const closing,
        // result = -1 means we did not find a fragment!
        int result = -1;
        int last_match_pos = -1;
-       if (token.find(last_match) != string::npos)
+       if (!last_match.empty() && token.find(last_match) != string::npos)
                last_match_pos = int(token.find(last_match));
        if (fragment) {
                if (last_match_pos > fragment_pos)
@@ -1054,6 +1058,7 @@ int iterateLine(string const token, regex const reg, string const closing,
        } else
                if (last_match_pos < fragment_pos)
                        result = fragment_pos;
+
        return result;
 }