]> git.lyx.org Git - lyx.git/commitdiff
Move \PassOptionsToPackage before the first package loaded
authorJuergen Spitzmueller <spitz@lyx.org>
Wed, 13 May 2020 06:48:08 +0000 (08:48 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Thu, 14 May 2020 07:18:16 +0000 (09:18 +0200)
Fixes #11862

(cherry picked from commit 2663e3845e6cc33ec543510aec16c7a37841e26d)

src/BufferParams.cpp
status.23x

index 8b408671e20afc7915439896f87fac2f922d60ad..9a15849e01788260654f33e32ef3f1458863f9b8 100644 (file)
@@ -1733,6 +1733,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");
@@ -2050,9 +2053,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
index 0d0c1815b4590b190521c5eafabfcc44c8d5307a..02def57e90818da0accaf49d0a3fd50c2a59a549 100644 (file)
@@ -73,7 +73,9 @@ What's new
 
 - Fix reloading of changed include inset (bug 11842).
 
-- Don't output \maketitle twice with branches (bug 11787)
+- Don't output \maketitle twice with branches (bug 11787).
+
+- Output \PassOptionsToPackage before any package is loaded (bug 11862).
 
 
 * USER INTERFACE