]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathSupport.cpp
Improve the list of equations
[lyx.git] / src / mathed / MathSupport.cpp
index 5df8a0673e76bde13a416722de542f0832fd1fc5..daf437fc67fe5003a868ccac45e6d2a093cb1508 100644 (file)
 #include "InsetMathSymbol.h"
 #include "Length.h"
 #include "MathData.h"
+#include "MathFactory.h"
 #include "MathParser.h"
 #include "MathStream.h"
 
+#include "LaTeXFeatures.h"
 #include "MetricsInfo.h"
 
 #include "frontends/FontLoader.h"
@@ -992,4 +994,16 @@ int axis_height(MetricsBase & mb)
 }
 
 
+void validate_math_word(LaTeXFeatures & features, docstring const & word)
+{
+       MathWordList const & words = mathedWordList();
+       MathWordList::const_iterator it = words.find(word);
+       if (it != words.end()) {
+               string const req = it->second.requires;
+               if (!req.empty())
+                       features.require(req);
+       }
+}
+
+
 } // namespace lyx