]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeX.C
remove mention of lyxrc from the splash
[lyx.git] / src / LaTeX.C
index 8a8ab8596a6ce407b96dceaf0eead1f31a3f3629..53cf4e9241b19993ac8c5b8257ca291aaf4f16fa 100644 (file)
@@ -21,6 +21,7 @@
 #include "funcrequest.h"
 #include "support/filetools.h"
 #include "support/FileInfo.h"
+#include "support/tostr.h"
 #include "support/lstrings.h"
 #include "support/lyxlib.h"
 #include "support/systemcall.h"
@@ -28,7 +29,6 @@
 #include "support/path.h"
 
 #include <boost/regex.hpp>
-#include "support/BoostFormat.h"
 
 #include <fstream>
 #include <cstdio>  // sscanf
@@ -70,13 +70,8 @@ namespace {
 
 void showRunMessage(LyXFunc * lf, unsigned int count)
 {
-       ostringstream str;
-#if USE_BOOST_FORMAT
-       str << boost::format(_("Waiting for LaTeX run number %1$d")) % count;
-#else
-       str << _("Waiting for LaTeX run number ") << count;
-#endif
-       lf->dispatch(FuncRequest(LFUN_MESSAGE, STRCONV(str.str())));
+       string str = bformat(_("Waiting for LaTeX run number %1$s"), tostr(count));
+       lf->dispatch(FuncRequest(LFUN_MESSAGE, str));
 }
 
 
@@ -92,12 +87,29 @@ void TeXErrors::insertError(int line, string const & error_desc,
        errors.push_back(newerr);
 }
 
+
+bool operator==(Aux_Info const & a, Aux_Info const & o)
+{
+       return a.aux_file == o.aux_file &&
+               a.citations == o.citations &&
+               a.databases == o.databases &&
+               a.styles == o.styles;
+}
+
+
+bool operator!=(Aux_Info const & a, Aux_Info const & o)
+{
+       return !(a == o);
+}
+
+
 /*
  * CLASS LaTeX
  */
 
-LaTeX::LaTeX(string const & latex, string const & f, string const & p)
-               : cmd(latex), file(f), path(p)
+LaTeX::LaTeX(string const & latex, LatexRunParams const & rp,
+            string const & f, string const & p)
+       : cmd(latex), file(f), path(p), runparams(rp)
 {
        num_errors = 0;
        depfile = file + ".dep";
@@ -152,7 +164,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun)
        bool rerun = false; // rerun requested
 
        // The class LaTeX does not know the temp path.
-       bufferlist.updateIncludedTeXfiles(lyx::getcwd());
+       bufferlist.updateIncludedTeXfiles(lyx::getcwd(), runparams);
 
        // Never write the depfile if an error was encountered.
 
@@ -219,11 +231,11 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun)
                showRunMessage(lfun, count);
        }
 
-       this->operator()();
+       startscript();
        scanres = scanLogFile(terr);
        if (scanres & ERROR_RERUN) {
                lyxerr[Debug::LATEX] << "Rerunning LaTeX" << endl;
-               this->operator()();
+               startscript();
                scanres = scanLogFile(terr);
        }
 
@@ -302,7 +314,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun)
                        showRunMessage(lfun, count);
                }
 
-               this->operator()();
+               startscript();
                scanres = scanLogFile(terr);
                if (scanres & ERRORS) {
                        deleteFilesOnError();
@@ -356,7 +368,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun)
                        showRunMessage(lfun, count);
                }
 
-               this->operator()();
+               startscript();
                scanres = scanLogFile(terr);
                if (scanres & ERRORS) {
                        deleteFilesOnError();
@@ -374,7 +386,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun)
 }
 
 
-int LaTeX::operator()()
+int LaTeX::startscript()
 {
 #ifndef __EMX__
        string tmp = cmd + ' ' + QuoteName(file) + " > /dev/null";