lyxpreamble += "\\synctex=-1\n";
}
+ // The package options (via \PassOptionsToPackage)
+ lyxpreamble += from_ascii(features.getPackageOptions());
+
// due to interferences with babel and hyperref, the color package has to
// be loaded (when it is not already loaded) before babel when hyperref
// is used with the colorlinks option, see
}
+string const LaTeXFeatures::getPackageOptions() const
+{
+ ostringstream packageopts;
+ // 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))
+ packageopts << "\\PassOptionsToPackage{" << it->second << "}"
+ << "{" << it->first << "}\n";
+ return packageopts.str();
+}
+
+
string const LaTeXFeatures::getPackages() const
{
ostringstream packages;
// 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) {
OutputParams const &);
/// The color packages
std::string const getColorOptions() const;
+ /// The requested package options
+ std::string const getPackageOptions() const;
/// The packages needed by the document
std::string const getPackages() const;
/// The macros definitions needed by the document
- Fix incorrect output of ampersands when multiple keys are given for a
citation (bug 9296).
+- Output package options (specified with PackageOptions layout tag)
+ before loading any potentially affected package (bug 9355).
+
- Fix export of documents that use the LaTeX-packages mhchem and wasysym
(bug 9266).