]> git.lyx.org Git - features.git/blobdiff - src/mathed/math_factory.C
change "support/std_sstream.h" to <sstream>
[features.git] / src / mathed / math_factory.C
index ba2d1d35229ca5f0d3f3906e22a549ca9b16b0aa..3da237bd528201a84c1ce5488fa569ef598c94d4 100644 (file)
 #include "debug.h"
 #include "math_support.h"
 
-#include "support/std_sstream.h"
 #include "support/filetools.h" // LibFileSearch
 #include "support/lstrings.h"
 
 #include "frontends/lyx_gui.h"
 
 #include <fstream>
+#include <sstream>
 
 using lyx::support::LibFileSearch;
 using lyx::support::split;
@@ -320,7 +320,14 @@ MathAtom createMathInset(string const & s)
        if (s == "dfrac")
                return MathAtom(new MathDfracInset);
 
-       return MathAtom(new MathMacro(s));
+       if (MacroTable::globalMacros().has(s))
+               return MathAtom(new MathMacro(s,
+                       MacroTable::globalMacros().get(s).numargs()));
+       //if (MacroTable::localMacros().has(s))
+       //      return MathAtom(new MathMacro(s,
+       //              MacroTable::localMacros().get(s).numargs()));
+
+       return MathAtom(new MathUnknownInset(s));
 }