X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FMathSupport.cpp;h=daf437fc67fe5003a868ccac45e6d2a093cb1508;hb=5fdc577badb1cb133d6a0dc7d831bb1f82576adb;hp=5df8a0673e76bde13a416722de542f0832fd1fc5;hpb=a44e7aa9156049a682c7496ea54ae665be91630b;p=lyx.git diff --git a/src/mathed/MathSupport.cpp b/src/mathed/MathSupport.cpp index 5df8a0673e..daf437fc67 100644 --- a/src/mathed/MathSupport.cpp +++ b/src/mathed/MathSupport.cpp @@ -17,9 +17,11 @@ #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