diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 05c12b401e..002a111a0c 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,8 @@ +2005-03-02 Georg Baum + + * math_parser.C (parse1): Don't parse "\|" following a "\left" or + "\right" as "|" + 2005-02-11 Jean-Marc Lasgouttes * math_casesinset.C (validate): New method. Requires amsmath. diff --git a/src/mathed/math_parser.C b/src/mathed/math_parser.C index 08a7372251..54b1b6f388 100644 --- a/src/mathed/math_parser.C +++ b/src/mathed/math_parser.C @@ -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))); }