]> git.lyx.org Git - lyx.git/blobdiff - src/BufferParams.cpp
Move \PassOptionsToPackage before the first package loaded
[lyx.git] / src / BufferParams.cpp
index 750c6e83fbebaf7b89d53f329b4eb5309eeb7715..e266a0fdabe10d18c2d0758067644334b38e6b17 100644 (file)
@@ -1735,6 +1735,9 @@ bool BufferParams::writeLaTeX(otexstream & os, LaTeXFeatures & features,
        os << '{' << from_ascii(tclass.latexname()) << "}\n";
        // end of \documentclass defs
 
+       // The package options (via \PassOptionsToPackage)
+       os << from_ascii(features.getPackageOptions());
+
        // if we use fontspec or newtxmath, we have to load the AMS packages here
        string const ams = features.loadAMSPackages();
        bool const ot1 = (main_font_encoding() == "default" || main_font_encoding() == "OT1");
@@ -2013,9 +2016,6 @@ bool BufferParams::writeLaTeX(otexstream & os, LaTeXFeatures & features,
                        os << "\\synctex=-1\n";
        }
 
-       // The package options (via \PassOptionsToPackage)
-       os << 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