commit 7a325e4125e14e8b89221b11ec22248b896d09fd
Author: Juergen Spitzmueller <[email protected]>
Date:   Wed May 7 07:53:25 2025 +0200

    Move theorem definitions once more
    
    It must be loaded after the user preamble for cases such
    as Mathematical Monthly who load amsthm themselves,
    but before babel since otherwise Hebrew chokes on it (see #7205)
---
 src/BufferParams.cpp  |  4 ++++
 src/LaTeXFeatures.cpp | 13 +++++--------
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp
index 3313be5d1a..68515de2a0 100644
--- a/src/BufferParams.cpp
+++ b/src/BufferParams.cpp
@@ -2872,6 +2872,10 @@ bool BufferParams::writeLaTeX(otexstream & os, 
LaTeXFeatures & features,
                   << atlyxpreamble.release()
                   << "\\makeatother\n\n";
 
+       // theorem definitions: Must be loaded after user preamble
+       // but before babel
+       os << features.getThmDefinitions();
+
        // We try to load babel late, in case it interferes with other packages.
        // Jurabib, hyperref, varioref, bicaption, menukeys and listings (bug 
8995)
        // have to be called after babel, though.
diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp
index c0084b665b..98c862eb97 100644
--- a/src/LaTeXFeatures.cpp
+++ b/src/LaTeXFeatures.cpp
@@ -1392,11 +1392,11 @@ string const LaTeXFeatures::getPackages() const
            params_.use_package("cancel") != BufferParams::package_off)
                packages << "\\usepackage{cancel}\n";
 
-       // marvosym and bbding both define the \Cross macro
-       if (mustProvide("marvosym")) {
-           if (mustProvide("bbding"))
-               packages << "\\let\\Cross\\relax\n";
-           packages << "\\usepackage{marvosym}\n";
+       // marvosym and bbding both define the \Cross macro
+       if (mustProvide("marvosym")) {
+               if (mustProvide("bbding"))
+                       packages << "\\let\\Cross\\relax\n";
+               packages << "\\usepackage{marvosym}\n";
        }
 
        // accents must be loaded after amsmath
@@ -2048,9 +2048,6 @@ string const LaTeXFeatures::loadAMSPackages() const
        if (mustProvide("amsthm"))
                tmp << "\\usepackage{amsthm}\n";
 
-       // theorem definitions
-       tmp << getThmDefinitions();
-
        if (mustProvide("amssymb")
            && params_.use_package("amssymb") != BufferParams::package_off)
                tmp << "\\usepackage{amssymb}\n";
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to