commit b0f6dd3a5fcc97959a622be0cd53b44c6d7c0860
Author: Juergen Spitzmueller <[email protected]>
Date: Sun Nov 23 10:18:18 2025 +0100
Do not load amstext if amsmath is loaded
This was done by getUnknownPackages() since those packages
have not been correctly registered
(cherry picked from commit e152b7f22f5f40461f653ea6845a545eb036e23d)
---
src/LaTeXFeatures.cpp | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp
index 7363729764..8b26943070 100644
--- a/src/LaTeXFeatures.cpp
+++ b/src/LaTeXFeatures.cpp
@@ -2104,16 +2104,17 @@ string const LaTeXFeatures::loadAMSPackages() const
{
ostringstream tmp;
- if (mustProvide("amsmath")
- && params_.use_package("amsmath") != BufferParams::package_off) {
+ bool const amsmath = mustProvide("amsmath")
+ && params_.use_package("amsmath") != BufferParams::package_off;
+ if (amsmath)
tmp << "\\usepackage{amsmath}\n";
- } else {
- // amsbsy and amstext are already provided by amsmath
- if (mustProvide("amsbsy"))
- tmp << "\\usepackage{amsbsy}\n";
- if (mustProvide("amstext"))
- tmp << "\\usepackage{amstext}\n";
- }
+ // amsbsy and amstext are already provided by amsmath
+ // we need to check with mustProvide here to
+ // register the packages in features_loaded_
+ if (mustProvide("amsbsy") && !amsmath)
+ tmp << "\\usepackage{amsbsy}\n";
+ if (mustProvide("amstext") && !amsmath)
+ tmp << "\\usepackage{amstext}\n";
if (mustProvide("amsthm"))
tmp << "\\usepackage{amsthm}\n";
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs