]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_parser.C
fix build, thesaurus
[lyx.git] / src / mathed / math_parser.C
index 3c3630318d93f8ceb8962e4acae0424f829acb8f..5c7b4b4a8391f62e0495e5f833d8ab6dfcd29499 100644 (file)
@@ -213,13 +213,13 @@ string Token::asString() const
        return cs_.size() ? cs_ : string(1, char_);
 }
 
-bool operator==(Token const & s, Token const & t)
-{
-       return s.character() == t.character()
-               && s.cat() == t.cat() && s.cs() == t.cs(); 
-}
-
-// Angus' compiler says this is not needed
+// Angus' compiler says these are not needed
+//bool operator==(Token const & s, Token const & t)
+//{
+//     return s.character() == t.character()
+//             && s.cat() == t.cat() && s.cs() == t.cs(); 
+//}
+//
 //bool operator!=(Token const & s, Token const & t)
 //{
 //     return !(s == t);
@@ -673,6 +673,12 @@ bool Parser::parse_normal(MathAtom & matrix)
 
        string const name = getArg('{', '}');
 
+       if (name == "math") {
+               matrix = MathAtom(new MathHullInset(LM_OT_SIMPLE));
+               parse_into(matrix->cell(0), 0);
+               return true;
+       }
+
        if (name == "equation" || name == "equation*" || name == "displaymath") {
                curr_num_ = (name == "equation");
                curr_label_.erase();
@@ -782,7 +788,7 @@ void Parser::parse_into(MathArray & array, unsigned flags, MathTextCodes code)
 
                else if (t.cat() == catParameter) {
                        Token const & n = getToken();
-                       array.push_back(MathAtom(new MathMacroArgument(n.character() - '0')));
+                       array.push_back(MathAtom(new MathMacroArgument(n.character()-'0', code)));
                }
 
                else if (t.cat() == catBegin) {