]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.cpp
Whitespace.
[lyx.git] / src / LaTeXFeatures.cpp
index 1d0f8b0f893c7e9992ec446ee0b295ce21b0492c..e4f563a456faf5b378792678d1b0b714979bea85 100644 (file)
@@ -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<string, string>::const_iterator it =
+           params_.documentClass().packageOptions().begin();
+       map<string, string>::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)