]> git.lyx.org Git - features.git/commitdiff
don't assert() on missing macro arguments
authorAndré Pönitz <poenitz@gmx.net>
Tue, 2 Apr 2002 07:33:38 +0000 (07:33 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Tue, 2 Apr 2002 07:33:38 +0000 (07:33 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3878 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/math_cursor.C
src/mathed/math_macrotable.C
src/mathed/math_parser.C

index 3a17efa565f25bcbbc51d12296c72cd0ad73e82f..4280c68ebe48a0c6692f075061489e4a392f50b2 100644 (file)
@@ -1465,6 +1465,11 @@ bool MathCursor::interpret(char c)
 
                macroModeClose();
 
+               if (c == '{' || c == '}') {
+                       insert(MathAtom(new MathSpecialCharInset(c)));
+                       return true;
+               }
+
                if (c != ' ')
                        interpret(c);
 
index d6436c9d51aca29dab116833841142f3a0e26f29..d2cd7d6f67e54040da80a0b5dc32bf0818b9a219 100644 (file)
@@ -89,6 +89,7 @@ void MathMacroTable::builtinMacros()
        //define("\\def\\emptyset{\\not0}");
        define("\\def\\notin{\\not\\in}");
        define("\\def\\slash{/}");
+       //define("\\def\\mathcircumflex{\\^}");
 
        // fontmath.ltx
 
index 70e827a319868badc88672d0ae707cf61bb2e4d1..64cb40acdc5ef168ba09e5e0e0ffea0ae8ac4d9f 100644 (file)
@@ -1031,8 +1031,8 @@ void Parser::parse_into1(MathArray & array, unsigned flags, MathTextCodes code)
                        dump();
                        lyxerr << "found '}' unexpectedly, array: '" << array << "'\n";
                        //lyxerr << "found '}' unexpectedly\n";
-                       lyx::Assert(0);
-                       add(array, '}', LM_TC_TEX);
+                       //lyx::Assert(0);
+                       //add(array, '}', LM_TC_TEX);
                }
 
                else if (t.cat() == catAlign) {