"ifsym",
"marvosym",
"txfonts",
+ "pxfonts",
+ "mathdesign",
"mathrsfs",
+ "mathabx",
"ascii",
"url",
"covington",
// if fontspec is used, AMS packages have to be loaded before
// fontspec (in BufferParams)
- if (!params_.useNonTeXFonts && !loadAMSPackages().empty())
- packages << loadAMSPackages();
+ string const amsPackages = loadAMSPackages();
+ if (!params_.useNonTeXFonts && !amsPackages.empty())
+ packages << amsPackages;
// fixltx2e must be loaded after amsthm, since amsthm produces an error with
// the redefined \[ command (bug 7233). Load is as early as possible, since
// esint must be after amsmath and wasysym, since it will redeclare
// inconsistent integral symbols
- if ((mustProvide("esint") || mustProvide("esintoramsmath")) &&
+ if (mustProvide("esint") &&
params_.use_esint != BufferParams::package_off)
packages << "\\usepackage{esint}\n";
if (mustProvide("amsthm"))
tmp << "\\usepackage{amsthm}\n";
- // esint is preferred for esintoramsmath
- if ((mustProvide("amsmath")
- && params_.use_amsmath != BufferParams::package_off)
- || (mustProvide("esintoramsmath")
- && params_.use_esint == BufferParams::package_off
- && params_.use_amsmath != BufferParams::package_off)) {
+ if (mustProvide("amsmath")
+ && params_.use_amsmath != BufferParams::package_off) {
tmp << "\\usepackage{amsmath}\n";
} else {
// amsbsy and amstext are already provided by amsmath
if (mustProvide("amstext"))
tmp << "\\usepackage{amstext}\n";
}
-
+
if (mustProvide("amssymb")
|| params_.use_amsmath == BufferParams::package_on)
tmp << "\\usepackage{amssymb}\n";
}
+void LaTeXFeatures::resolveAlternatives()
+{
+ for (Features::iterator it = features_.begin(); it != features_.end();) {
+ if (contains(*it, '|')) {
+ vector<string> const alternatives = getVectorFromString(*it, "|");
+ vector<string>::const_iterator const end = alternatives.end();
+ vector<string>::const_iterator ita = alternatives.begin();
+ for (; ita != end; ++ita) {
+ if (isRequired(*ita))
+ break;
+ }
+ if (ita == end)
+ require(alternatives.front());
+ features_.erase(it);
+ it = features_.begin();
+ } else
+ ++it;
+ }
+}
+
+
} // namespace lyx