commit 4af43b6d52aca67ea58178d6ada1893124cd1bee
Author: Richard Kimberly Heck <[email protected]>
Date: Tue Nov 22 21:28:14 2022 -0500
Fix #12524. From Enrico.
---
src/mathed/InsetMathMacro.cpp | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/mathed/InsetMathMacro.cpp b/src/mathed/InsetMathMacro.cpp
index 5e72eec..1a5e220 100644
--- a/src/mathed/InsetMathMacro.cpp
+++ b/src/mathed/InsetMathMacro.cpp
@@ -908,14 +908,18 @@ void InsetMathMacro::validate(LaTeXFeatures & features)
const
features.require(data->requires());
}
- if (name() == "binom")
- features.require("binom");
-
// validate the cells and the definition
if (displayMode() == DISPLAY_NORMAL) {
d->definition_.validate(features);
- InsetMathNest::validate(features);
+ } else if (displayMode() == DISPLAY_INIT) {
+ MathData ar(const_cast<Buffer *>(&buffer()));
+ MacroData const * data = buffer().getMacro(name());
+ if (data) {
+ asArray(data->definition(), ar);
+ ar.validate(features);
+ }
}
+ InsetMathNest::validate(features);
}
--
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs