Don't create nested text-in-math environments and don't wrap characters

marked as mathalpha in the unicodesymbols file.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@29122 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2009-04-06 09:07:52 +00:00
parent a2e4654ea6
commit 9761a302d6

View File

@ -910,13 +910,16 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
else if (t.cat() == catOther) {
char_type c = t.character();
if (c < 0x80 || mode_ & Parse::VERBATIM
|| !(mode_ & Parse::USETEXT)) {
|| !(mode_ & Parse::USETEXT)
|| mode == InsetMath::TEXT_MODE
|| Encodings::isMathAlpha(c)) {
cell->push_back(MathAtom(new InsetMathChar(c)));
} else {
MathAtom at = createInsetMath("text");
at.nucleus()->cell(0).push_back(MathAtom(new InsetMathChar(c)));
while (nextToken().cat() == catOther
&& nextToken().character() >= 0x80) {
&& nextToken().character() >= 0x80
&& !Encodings::isMathAlpha(nextToken().character())) {
c = getToken().character();
at.nucleus()->cell(0).push_back(MathAtom(new InsetMathChar(c)));
}