From: André Pönitz Date: Tue, 4 Sep 2001 07:39:29 +0000 (+0000) Subject: fix the | vs \| business... X-Git-Tag: 1.6.10~20670 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=92705b7a741eca5b972bd6c91fcb6ad2e1ff40ea;p=features.git fix the | vs \| business... git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2676 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/math_cursor.C b/src/mathed/math_cursor.C index c205450783..eeb7dfb8c6 100644 --- a/src/mathed/math_cursor.C +++ b/src/mathed/math_cursor.C @@ -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; diff --git a/src/mathed/math_hash.C b/src/mathed/math_hash.C index 9ce9aef14d..7e8b07f3ba 100644 --- a/src/mathed/math_hash.C +++ b/src/mathed/math_hash.C @@ -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, '}'} }; diff --git a/src/mathed/math_macrotable.C b/src/mathed/math_macrotable.C index effb936f81..ac067a9778 100644 --- a/src/mathed/math_macrotable.C +++ b/src/mathed/math_macrotable.C @@ -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"); diff --git a/src/mathed/math_parser.C b/src/mathed/math_parser.C index 42256d2fbc..d3915d0263 100644 --- a/src/mathed/math_parser.C +++ b/src/mathed/math_parser.C @@ -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; diff --git a/src/mathed/math_parser.h b/src/mathed/math_parser.h index 68ef43cce9..067d59b313 100644 --- a/src/mathed/math_parser.h +++ b/src/mathed/math_parser.h @@ -55,8 +55,6 @@ enum MathTokenEnum LM_TK_END, /// LM_TK_NEWLINE, - /// - LM_TK_UNDEF, /// mathcal, mathrm... LM_TK_OLDFONT, /// cal,...