fix the | vs \| business...

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2676 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2001-09-04 07:39:29 +00:00
parent f9a3bafea3
commit 92705b7a74
5 changed files with 3 additions and 16 deletions

View File

@ -1284,14 +1284,14 @@ void MathCursor::interpret(string const & s)
return;
}
if (lastcode_ != LM_TC_TEX && strchr("#$%{|}", c)) {
if (lastcode_ != LM_TC_TEX && strchr("#$%{}", c)) {
insert(new MathSpecialCharInset(c));
return;
}
if (lastcode_ == LM_TC_TEX) {
if (macroName().empty()) {
if (strchr("#$%{|}", c)) {
if (strchr("#$%{}", c)) {
insert(new MathCharInset(c, LM_TC_TEX));
lastcode_ = LM_TC_VAR;
return;

View File

@ -128,7 +128,6 @@ latexkeys_a wordlist_array[] =
{"widehat", LM_TK_DECORATION, 0},
{"widetilde", LM_TK_DECORATION, 0},
{"{", LM_TK_SPECIAL, '{'},
{"|", LM_TK_UNDEF, '|'},
{"}", LM_TK_SPECIAL, '}'}
};

View File

@ -100,6 +100,7 @@ void MathMacroTable::builtinMacros()
createTemplate("owns", 0, "\\ni");
createTemplate("gets", 0, "\\leftarrow");
createTemplate("to", 0, "\\rightarrow");
createTemplate("|", 0, "\\parallel");
createTemplate("longleftrightarrow", 0, "\\leftarrow\\kern-6mu\\rightarrow");
createTemplate("Longleftrightarrow", 0, "\\Leftarrow\\kern-6mu\\Rightarrow");

View File

@ -785,17 +785,6 @@ void Parser::parse_into(MathArray & array, unsigned flags, MathTextCodes code)
break;
}
case LM_TK_UNDEF:
if (MathMacroTable::hasTemplate(sval_)) {
MathMacro * m = MathMacroTable::cloneTemplate(sval_);
for (int i = 0; i < m->nargs(); ++i)
parse_into(m->cell(i), FLAG_ITEM);
array.push_back(m);
m->metrics(LM_ST_TEXT);
} else
array.push_back(new MathFuncInset(sval_));
break;
else LM_TK_SPECIAL:
array.push_back(new MathCharInset(ival_, LM_TC_TEX));
break;

View File

@ -55,8 +55,6 @@ enum MathTokenEnum
LM_TK_END,
///
LM_TK_NEWLINE,
///
LM_TK_UNDEF,
/// mathcal, mathrm...
LM_TK_OLDFONT,
/// cal,...