]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_parser.C
rename commandtags.h to lfuns.h and renumber/cleanup. Rebuild the tree !
[lyx.git] / src / mathed / math_parser.C
index ea289cc82c7a59b4666d47952409c6dd73219218..44071e9001c25114540b26bf3d3e27c30a280699 100644 (file)
@@ -206,6 +206,8 @@ ostream & operator<<(ostream & os, Token const & t)
 {
        if (t.cs().size())
                os << '\\' << t.cs();
+       else if (t.cat() == catLetter)
+               os << t.character();
        else
                os << '[' << t.character() << ',' << t.cat() << ']';
        return os;
@@ -965,7 +967,7 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
                        parse(cell->back().nucleus()->cell(0), FLAG_ITEM, mode);
                }
 
-               else if (t.cs() == "ref" || t.cs() == "prettyref" || 
+               else if (t.cs() == "ref" || t.cs() == "prettyref" ||
                                t.cs() == "pageref" || t.cs() == "vpageref" || t.cs() == "vref") {
                        cell->push_back(MathAtom(new RefInset(t.cs())));
                        parse(cell->back().nucleus()->cell(1), FLAG_OPTION, mode);
@@ -1078,10 +1080,11 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
                        }
 
                        else {
-                               //lyxerr << "unknow math inset begin '" << name << "'\n";
+                               dump();
+                               lyxerr << "found unknown math environment '" << name << "'\n";
                                // create generic environment inset
                                cell->push_back(MathAtom(new MathEnvInset(name)));
-                               parse2(cell->back(), FLAG_END, mode, false);
+                               parse(cell->back().nucleus()->cell(0), FLAG_ITEM, mode);
                        }
                }