mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
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:
parent
f9a3bafea3
commit
92705b7a74
@ -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;
|
||||
|
@ -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, '}'}
|
||||
};
|
||||
|
||||
|
@ -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");
|
||||
|
@ -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;
|
||||
|
@ -55,8 +55,6 @@ enum MathTokenEnum
|
||||
LM_TK_END,
|
||||
///
|
||||
LM_TK_NEWLINE,
|
||||
///
|
||||
LM_TK_UNDEF,
|
||||
/// mathcal, mathrm...
|
||||
LM_TK_OLDFONT,
|
||||
/// cal,...
|
||||
|
Loading…
Reference in New Issue
Block a user