Jean-Marc Lasgouttes wrote: >>>>>> "Georg" == Georg Baum >>>>>> <[EMAIL PROTECTED]> >>>>>> writes: > > Georg> Jean-Marc, bug 1542 is only fixed partially in 1.3 (we got a > Georg> new report two days ago): If you enter "&" in math mode it is > Georg> saved as "&", but it should be saved as "\&". Backporting the > Georg> fix from 1.4 is trivial, do you want me to do it? > > Yes, please.
It turned out that the fix in 1.4 is incomplete: If you insert an '&' inside an mbox or textrm it is blue instead of black, but this is not the biggest problem: If you'll read such a file again you have suddenly a space behind the ampersand. The attached patch (against 1.4) fixes that, but I am not 100% sure wether it is correct. And I don't know at all how to get the '&' in black color in text mode. André, we need your help! Georg
Index: src/mathed/math_parser.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_parser.C,v retrieving revision 1.312 diff -u -p -r1.312 math_parser.C --- src/mathed/math_parser.C 2 Mar 2005 14:26:12 -0000 1.312 +++ src/mathed/math_parser.C 8 Apr 2005 13:16:41 -0000 @@ -1283,6 +1297,7 @@ void Parser::parse1(MathGridInset & grid else { MathAtom at = createMathInset(t.cs()); + skipSpaces(); for (MathInset::idx_type i = 0; i < at->nargs(); ++i) parse(at.nucleus()->cell(i), FLAG_ITEM, asMode(mode, l->extra));