#include "lyxlex.h"
#include "Lsstream.h"
#include "author.h"
+#include "gettext.h"
#include "support/lyxalgo.h" // for lyx::count
#include "support/lyxlib.h"
#include "support/lstrings.h"
#include "support/types.h"
+#include "frontends/Alert.h"
+
#include <cstdlib>
#include <algorithm>
#endif
bool use_babel;
+
BufferParams::BufferParams()
// Initialize textclass to point to article. if `first' is
// true in the returned pair, then `second' is the textclass
textclass = 0;
return classname;
}
+ if (!getLyXTextClass().isTeXClassAvailable()) {
+ string msg = bformat(_("The document uses a missing "
+ "TeX class \"%1$s\".\n"), classname);
+ Alert::warning(_("Document class not available"),
+ msg + _("LyX will not be able to produce output."));
+ }
} else if (token == "\\begin_preamble") {
readPreamble(lex);
} else if (token == "\\options") {
tracking_changes = lex.getInteger();
} else if (token == "\\author") {
lex.nextToken();
- istringstream ss(lex.getString());
+ istringstream ss(STRCONV(lex.getString()));
Author a;
ss >> a;
author_map.push_back(authorlist.record(a));
}
-void BufferParams::writeLaTeX(ostream & os, LaTeXFeatures & features,
+bool BufferParams::writeLaTeX(ostream & os, LaTeXFeatures & features,
TexRow & texrow) const
{
os << "\\documentclass";
}
os << lyxpreamble;
+ return use_babel;
}
void BufferParams::setPaperStuff()