]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.cpp
Whitespace.
[lyx.git] / src / LaTeXFeatures.cpp
index ece463005caf15d12b9e151f5c428db96b9ae765..e4f563a456faf5b378792678d1b0b714979bea85 100644 (file)
@@ -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)