fix \| after \left or \right in mathed

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_3_X@9695 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2005-03-05 18:19:20 +00:00
parent 1ca8847e66
commit fc7bbcded2
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2005-03-02 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* math_parser.C (parse1): Don't parse "\|" following a "\left" or
"\right" as "|"
2005-02-11 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* math_casesinset.C (validate): New method. Requires amsmath.

View File

@ -1022,10 +1022,15 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
}
else if (t.cs() == "left") {
string l = getToken().asString();
Token const & tl = getToken();
// \| and \Vert are equivalent, and MathDelimInset
// can't handle \|
// FIXME: fix this in MathDelimInset itself!
string const l = tl.cs() == "|" ? "Vert" : tl.asString();
MathArray ar;
parse(ar, FLAG_RIGHT, mode);
string r = getToken().asString();
Token const & tr = getToken();
string const r = tr.cs() == "|" ? "Vert" : tr.asString();
cell->push_back(MathAtom(new MathDelimInset(l, r, ar)));
}