{"prime", LM_TK_SYM, LM_prime, LMB_NONE},
{"prod", LM_TK_BIGSYM, LM_prod, LMB_NONE},
{"propto", LM_TK_SYM, LM_propto, LMB_RELATION},
+ {"protect", LM_TK_PROTECT, 0, LMB_RELATION},
{"psi", LM_TK_SYM, LM_psi, LMB_NONE},
{"qquad", LM_TK_SPACE, LM_qquad, LMB_NONE},
{"quad", LM_TK_SPACE, LM_quad, LMB_NONE},
LexSpace,
LexNewLine,
LexOther,
+ LexMath,
LexSelf
};
lexcode['\n'] = LexNewLine;
lexcode['%'] = LexComment;
lexcode['#'] = LexArgument;
+ lexcode['$'] = LexMath;
lexcode['+'] = lexcode['-'] = lexcode['*'] = lexcode['/']
= lexcode['<'] = lexcode['>'] = lexcode['='] = LexBOP;
} else if (lexcode[c] == LexBOP) {
yylval.i = c;
return LM_TK_BOP;
+ } else if (lexcode[c] == LexMath) {
+ yylval.i = 0;
+ return LM_TK_MATH;
} else if (lexcode[c] == LexSelf) {
return c;
} else if (lexcode[c] == LexArgument) {
break;
}
+ case LM_TK_MATH:
case LM_TK_BEGIN: {
int i = yylval.i;
- //lyxerr[Debug::MATHED] << "reading math environment " << i << " "
- // << latex_mathenv[i].name << "\n";
+ lyxerr[Debug::MATHED]
+ << "reading math environment " << i << " "
+ << latex_mathenv[i].name << "\n";
MathInsetTypes typ = latex_mathenv[i].typ;
p = new MathMatrixInset(typ);
}
default:
- lyxerr[Debug::MATHED] << "1: unknown math environment: " << typ << "\n";
+ lyxerr[Debug::MATHED]
+ << "1: unknown math environment: " << typ << "\n";
}
p->setName(latex_mathenv[i].basename);
}
default:
- lyxerr[Debug::MATHED] << "2 unknown math environment: " << t << "\n";
+ lyxerr[Debug::MATHED]
+ << "2 unknown math environment: " << t << "\n";
}
return p;
<< "found newline unexpectedly, array: '" << array << "'\n";
break;
+ case LM_TK_PROTECT:
+ break;
+
case LM_TK_BIGSYM:
case LM_TK_SYM:
case LM_TK_FUNCLIM:
array.push_back(new MathFuncInset(yytext));
break;
+ case LM_TK_MATH:
case LM_TK_END:
--plevel;
return;