]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_factory.C
oh well
[lyx.git] / src / mathed / math_factory.C
index a032db44a4034e8921fec149ec7103c079639385..ec39ab9636a50569b58de84412bcfb5228ea1604 100644 (file)
@@ -1,8 +1,11 @@
 #include <config.h>
 
 #include "math_parser.h"
+#include "math_arrayinset.h"
+#include "math_amsarrayinset.h"
 #include "math_binominset.h"
 #include "math_boxinset.h"
+#include "math_casesinset.h"
 #include "math_decorationinset.h"
 #include "math_dotsinset.h"
 #include "math_funcinset.h"
 #include "math_rootinset.h"
 #include "math_sizeinset.h"
 #include "math_spaceinset.h"
+#include "math_splitinset.h"
 #include "math_specialcharinset.h"
 #include "math_sqrtinset.h"
 #include "math_stackrelinset.h"
+#include "math_substackinset.h"
 #include "math_symbolinset.h"
+#include "math_undersetinset.h"
 #include "math_unknowninset.h"
+#include "math_xarrowinset.h"
+#include "math_xymatrixinset.h"
+#include "math_xyarrowinset.h"
 
 
 MathAtom createMathInset(latexkeys const * l)
@@ -41,8 +50,8 @@ MathAtom createMathInset(latexkeys const * l)
                return MathAtom(new MathSymbolInset(l));
        case LM_TK_STACK:
                return MathAtom(new MathStackrelInset);
-       case LM_TK_KERN: 
-               return MathAtom(new MathKernInset);
+       case LM_TK_UNDERSET:
+               return MathAtom(new MathUndersetInset);
        case LM_TK_BINOM:
        case LM_TK_CHOOSE:
                return MathAtom(new MathBinomInset);
@@ -87,11 +96,36 @@ MathAtom createMathInset(string const & s)
                        && s[2] >= '1' && s[2] <= '9')
                return MathAtom(new MathMacroArgument(s[2] - '0'));
 
+       if (s == "kern")
+               return MathAtom(new MathKernInset);
+
+       if (s == "xymatrix")
+               return MathAtom(new MathXYMatrixInset);
+
+       if (s == "xrightarrow" || s == "xleftarrow")
+               return MathAtom(new MathXArrowInset(s));
+
+       if (s == "split" || s == "gathered" || s == "aligned")
+               return MathAtom(new MathSplitInset(s));
+
+       if (s == "cases")
+               return MathAtom(new MathCasesInset);
+
+       if (s == "substack")
+               return MathAtom(new MathSubstackInset);
+
+       if (s == "subarray" || s == "array")
+               return MathAtom(new MathArrayInset(s, 1, 1));
+
+       if (s == "pmatrix" || s == "bmatrix" || s == "vmatrix" || s == "Vmatrix" ||
+                 s == "matrix")
+               return MathAtom(new MathAMSArrayInset(s));
+
        latexkeys const * l = in_word_set(s);
        if (l)
                return createMathInset(l);
 
-       if (MathMacroTable::has(s)) 
+       if (MathMacroTable::has(s))
                return MathAtom(new MathMacro(s));
 
        //cerr << "creating inset 2 with name: '" << s << "'\n";