Am Sonntag, dem 23.11.2025 um 10:32 +0100 schrieb Jürgen Spitzmüller:
> Am Sonntag, dem 23.11.2025 um 11:37 +0300 schrieb [email protected]:
> > Perhaps related: When \shortintertext is used, mathtools package is
> > added to preamble (which is of course necessary for
> > \shortintertext),
> > although in Document Settings mathtools is set to “Do not load”. It
> > seems the options in the Document Settings are not always honored,
> > or
> > maybe the intended meaning of “Do not load” is different.
>
> For mathtools, the document setting is not considered at all.
Here's a fix that does not touch the loading order (mathtools currently
is in simplefeatures).
--
Jürgen
diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp
index da905cb057..6f7957a199 100644
--- a/src/LaTeXFeatures.cpp
+++ b/src/LaTeXFeatures.cpp
@@ -1358,7 +1358,8 @@ string const LaTeXFeatures::getPackages() const
if (mustProvide(feature)) {
if (before_simplefeature_.find(feature) != before_simplefeature_.end())
packages << before_simplefeature_[feature];
- packages << "\\usepackage{" << feature << "}\n";
+ if (params_.use_package(feature) != BufferParams::package_off)
+ packages << "\\usepackage{" << feature << "}\n";
if (after_simplefeature_.find(feature) != after_simplefeature_.end())
packages << after_simplefeature_[feature];
}
--
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel