X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FLaTeXFeatures.cpp;h=e4f563a456faf5b378792678d1b0b714979bea85;hb=f34394460a1c22937c9732f55f00aa6952764264;hp=1d0f8b0f893c7e9992ec446ee0b295ce21b0492c;hpb=82b872365488d862a02d71f765e69c55f5260b5d;p=lyx.git diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index 1d0f8b0f89..e4f563a456 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -617,7 +617,7 @@ bool LaTeXFeatures::hasPolyglossiaExclusiveLanguages() const for (LanguageList::const_iterator cit = begin; cit != UsedLanguages_.end(); ++cit) { - if ((*cit)->babel().empty() && !(*cit)->polyglossia().empty() && (*cit)->requires().empty()) + if ((*cit)->isPolyglossiaExclusive()) return true; } return false; @@ -825,20 +825,25 @@ string const LaTeXFeatures::getPackages() const // also unknown packages can be requested. They are silently // swallowed now. We should change this eventually. - // + // Output all the package option stuff we have been asked to do. + map::const_iterator it = + params_.documentClass().packageOptions().begin(); + map::const_iterator en = + params_.documentClass().packageOptions().end(); + for (; it != en; ++it) + if (mustProvide(it->first)) + packages << "\\PassOptionsToPackage{" << it->second << "}" + << "{" << it->first << "}\n"; + // These are all the 'simple' includes. i.e // packages which we just \usepackage{package} - // for (int i = 0; i < nb_simplefeatures; ++i) { if (mustProvide(simplefeatures[i])) - packages << "\\usepackage{" - << simplefeatures[i] << "}\n"; + packages << "\\usepackage{" << simplefeatures[i] << "}\n"; } - // // The rest of these packages are somewhat more complicated // than those above. - // // if fontspec is used, AMS packages have to be loaded before // fontspec (in BufferParams)