#include <fstream>
+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;
+
namespace lyx {
namespace os = support::os;
namespace fs = boost::filesystem;
-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;
-
// TODO: in no particular order
// - get rid of the call to
// BufferList::updateIncludedTeXfiles, this should either
head.update();
// Can't just check if anything has changed because it might
// have aborted on error last time... in which cas we need
- // to re-run latex and collect the error messages
+ // to re-run latex and collect the error messages
// (even if they are the same).
if (!fs::exists(output_file.toFilesystemEncoding())) {
LYXERR(Debug::DEPEND)
// A second latex run is needed.
FileName const idxfile(changeExtension(file.absFilename(), ".idx"));
rerun = fs::exists(idxfile.toFilesystemEncoding()) &&
- fs::is_empty(idxfile.toFilesystemEncoding());
+ fs::is_empty(idxfile.toFilesystemEncoding());
// run makeindex
if (head.haschanged(idxfile)) {
bool LaTeX::runMakeIndex(string const & f, OutputParams const & runparams,
- string const & params)
+ string const & params)
{
LYXERR(Debug::LATEX)
<< "idx file has been made, running makeindex on file "
<< f << endl;
string tmp = lyxrc.index_command + ' ';
-
+
tmp = subst(tmp, "$$lang", runparams.document_language);
tmp += quoteName(f);
tmp += params;
// we have a latex error
retval |= TEX_ERROR;
if (contains(desc,
- "Package babel Error: You haven't defined the language"))
+ "Package babel Error: You haven't defined the language") ||
+ contains(desc,
+ "Package babel Error: You haven't loaded the option"))
retval |= ERROR_RERUN;
// get the line number:
int line = 0;
// Sometimes, filenames are broken across lines.
// We care for that and save suspicious lines.
- // Here we exclude some cases where we are sure
+ // Here we exclude some cases where we are sure
// that there is no continued filename
if (!lastline.empty()) {
static regex package_info("Package \\w+ Info: .*");
found_file = false;
// (6) "Writing nomenclature file file.ext"
} else if (regex_match(token, sub, regnomencl) ||
- regex_match(token, sub, regoldnomencl))
+ regex_match(token, sub, regoldnomencl))
// check for dot
found_file = checkLineBreak(sub.str(1), head);
// (7) "\tf@toc=\write<nr>" (for MikTeX)