mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
remove the hard-coded greek stuff, it is handled in math.bind nowadays
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2912 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
4ca7022e52
commit
910b8c6a07
@ -488,7 +488,7 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action,
|
||||
case LFUN_GREEK:
|
||||
handleFont(bv, LM_TC_GREEK1);
|
||||
if (arg.size())
|
||||
mathcursor->interpret(arg[0]);
|
||||
mathcursor->interpret(arg);
|
||||
break;
|
||||
|
||||
case LFUN_MATH_MODE:
|
||||
|
@ -1377,31 +1377,14 @@ void MathCursor::interpret(char c)
|
||||
return;
|
||||
}
|
||||
|
||||
if (isalpha(c) && (lastcode_ == LM_TC_GREEK || lastcode_ == LM_TC_GREEK1)) {
|
||||
static char const greekl[][26] =
|
||||
{"alpha", "beta", "chi", "delta", "epsilon", "phi",
|
||||
"gamma", "eta", "iota", "epsilon", "kappa", "lambda", "mu",
|
||||
"nu", "omega", "pi", "vartheta", "rho", "sigma",
|
||||
"tau", "upsilon", "theta", "omega", "xi", "varphi", "zeta"};
|
||||
static char const greeku[][26] =
|
||||
{"alpha", "beta", "chi", "Delta", "varepsilon", "Phi",
|
||||
"Gamma", "varepsilon", "varepsilon", "epsilon", "kappa", "Lambda", "mu",
|
||||
"Nu", "Omega", "Pi", "vartheta", "varrho", "Sigma", "varsigma",
|
||||
"Upsilon", "Theta", "Omega", "Xi", "Varphi", "zeta"};
|
||||
|
||||
latexkeys const * l = 0;
|
||||
if ('a' <= c && c <= 'z')
|
||||
l = in_word_set(greekl[c - 'a']);
|
||||
if ('A' <= c && c <= 'Z')
|
||||
l = in_word_set(greeku[c - 'A']);
|
||||
|
||||
if (l)
|
||||
insert(createMathInset(l));
|
||||
else
|
||||
insert(c, LM_TC_VAR);
|
||||
if (isalpha(c) && lastcode_ == LM_TC_GREEK) {
|
||||
insert(c, LM_TC_VAR);
|
||||
return;
|
||||
}
|
||||
|
||||
if (lastcode_ == LM_TC_GREEK1)
|
||||
lastcode_ = LM_TC_VAR;
|
||||
if (isalpha(c) && lastcode_ == LM_TC_GREEK1) {
|
||||
insert(c, LM_TC_VAR);
|
||||
lastcode_ = LM_TC_VAR;
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user