On Sat, Nov 22, 2025 at 02:50:03PM +0100, Jürgen Spitzmüller wrote:
Am Samstag, dem 22.11.2025 um 12:45 +0300 schrieb [email protected]:
The behavior is different with color amstext, as they do not go away
by saving and re-opening.
amstext is not a color, and it is loaded since your math uses \text.
This is principally correct, since the command is provided by this
package.
On the other hand, if amsmath is loaded, this will also load amstext
internally, so we do not need to load the package in that case
ourselves.
Looking closer, this is also what we attempt.
However, the new method
LaTeXFeatures::getUnknownPackages()
loads it then since it never gets added to features_loaded_.
The attached patch would fix this, but there are probably more cases
like this (maybe the geometry case has the same cause), so I wonder if
the problem should rather be fixed in getUnknownPackages() which should
really only load _unknown_ packages, not all required packages not
loaded so far.
As to geometry: LaTeXFeatures::isProvided() does not add a package to
features_loaded_ if it is provided. This might be the reason for it to
be loaded when it shouldn't.
Enrico?
Sorry Jürgen, I was missing this. However, I see that you solved
brilliantly the issue, thanks.
--
Enrico
--
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel