fix \| after \left or \right in mathed

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9689 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2005-03-02 14:26:12 +00:00
parent fe96831a8c
commit 728c2da883
2 changed files with 14 additions and 4 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-28 André Pönitz <poenitz@lyx.org>
* math_nestinset.C (lfunMouseRelease, lfunMouseMotion, lfunMousePress):

View File

@ -1048,11 +1048,16 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
else if (t.cs() == "left") {
skipSpaces();
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);
skipSpaces();
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)));
}
@ -1083,8 +1088,8 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
}
else if (name == "split" || name == "cases" ||
name == "gathered" || name == "aligned" ||
name == "alignedat") {
name == "gathered" || name == "aligned" ||
name == "alignedat") {
cell->push_back(createMathInset(name));
parse2(cell->back(), FLAG_END, mode, false);
}