#include "language.h"
#include "encoding.h"
#include "LString.h"
+#include "Lsstream.h"
#include "support/filetools.h"
#include "support/lstrings.h"
+using namespace lyx::support;
+
using lyx::textclass_type;
using std::endl;
{}
+bool LaTeXFeatures::useBabel() const
+{
+ return lyxrc.language_use_babel ||
+ bufferParams().language->lang() != lyxrc.default_language ||
+ this->hasLanguages();
+}
+
+
void LaTeXFeatures::require(string const & name)
{
if (isRequired(name))
}
+
string const LaTeXFeatures::getPackages() const
{
ostringstream packages;
LyXTextClass const & tclass = params.getLyXTextClass();
-
//
// These are all the 'simple' includes. i.e
// packages which we just \usepackage{package}
//
if (isRequired("amsmath")
- && ! tclass.provides(LyXTextClass::amsmath)) {
+ && !tclass.provides(LyXTextClass::amsmath)
+ && params.use_amsmath != BufferParams::AMS_OFF) {
packages << "\\usepackage{amsmath}\n";
}
}
// amssymb.sty
- if (isRequired("amssymb") || params.use_amsmath)
+ if (isRequired("amssymb") || params.use_amsmath == BufferParams::AMS_ON)
packages << "\\usepackage{amssymb}\n";
// url.sty
if (isRequired("url") && ! tclass.provides(LyXTextClass::url))