]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathFactory.cpp
tex2lyx: support for \item with opt arg in itemize environment
[lyx.git] / src / mathed / MathFactory.cpp
index 24e35c9b68911a74ae57d676b0ab8099abba953e..951d506a46b63915093b6c00ad2e60a7a72d9363 100644 (file)
@@ -120,8 +120,6 @@ bool canBeDisplayed(char_type c)
 
 bool isUnicodeSymbolAvailable(docstring const & name, char_type & c)
 {
-       // this is too fragile, e.g. prodes W instead of capital omega on OS X
-#if 0
        docstring cmd(from_ascii("\\") + name);
        bool is_combining;
        bool termination;
@@ -135,9 +133,6 @@ bool isUnicodeSymbolAvailable(docstring const & name, char_type & c)
                                                is_combining, termination);
        }
        return c != 0 && !is_combining;
-#else
-       return false;
-#endif
 }
 
 
@@ -471,7 +466,14 @@ MathAtom createInsetMath(docstring const & s, Buffer * buf)
 
        if (s == "Diagram")
                return MathAtom(new InsetMathDiagram(buf));
-       if (s == "xrightarrow" || s == "xleftarrow")
+       if (s == "xrightarrow" || s == "xleftarrow" ||
+               s == "xhookrightarrow" || s == "xhookleftarrow" ||
+               s == "xRightarrow" || s == "xLeftarrow" ||
+               s == "xleftrightarrow" || s == "xLeftrightarrow" ||
+               s == "xrightharpoondown" || s == "xrightharpoonup" ||
+               s == "xleftharpoondown" || s == "xleftharpoonup" ||
+               s == "xleftrightharpoons" || s == "xrightleftharpoons" ||
+               s == "xmapsto")
                return MathAtom(new InsetMathXArrow(buf, s));
        if (s == "split" || s == "alignedat")
                return MathAtom(new InsetMathSplit(buf, s));
@@ -561,6 +563,11 @@ MathAtom createInsetMath(docstring const & s, Buffer * buf)
                return MathAtom(new InsetMathCancelto(buf));
        if (s == "smash")
                return MathAtom(new InsetMathPhantom(buf, InsetMathPhantom::smash));
+       // The following 2 string values are only for math toolbar use, no LaTeX names
+       if (s == "smashb")
+               return MathAtom(new InsetMathPhantom(buf, InsetMathPhantom::smashb));
+       if (s == "smasht")
+               return MathAtom(new InsetMathPhantom(buf, InsetMathPhantom::smasht));
        if (s == "mathclap")
                return MathAtom(new InsetMathPhantom(buf, InsetMathPhantom::mathclap));
        if (s == "mathllap")