break;
}
+ case LFUN_MATH_FONT_STYLE: {
+ FuncRequest fr = FuncRequest(LFUN_MATH_INSERT, '\\' + cmd.argument());
+ doDispatch(cur, fr);
+ break;
+ }
+
case LFUN_MATH_SIZE: {
FuncRequest fr = FuncRequest(LFUN_MATH_INSERT, cmd.argument());
doDispatch(cur, fr);
flag.setEnabled(currentMode() != TEXT_MODE);
break;
- case LFUN_MATH_INSERT: {
+ case LFUN_MATH_FONT_STYLE: {
bool const textarg =
- arg == "\\textbf" || arg == "\\textsf" ||
- arg == "\\textrm" || arg == "\\textmd" ||
- arg == "\\textit" || arg == "\\textsc" ||
- arg == "\\textsl" || arg == "\\textup" ||
- arg == "\\texttt" || arg == "\\textbb" ||
- arg == "\\textnormal";
+ arg == "textbf" || arg == "textsf" ||
+ arg == "textrm" || arg == "textmd" ||
+ arg == "textit" || arg == "textsc" ||
+ arg == "textsl" || arg == "textup" ||
+ arg == "texttt" || arg == "textbb" ||
+ arg == "textnormal";
flag.setEnabled(currentMode() != TEXT_MODE || textarg);
break;
}
+ case LFUN_MATH_INSERT:
+ flag.setEnabled(currentMode() != TEXT_MODE);
+ break;
+
case LFUN_MATH_MATRIX:
flag.setEnabled(currentMode() == MATH_MODE);
break;
// try auto-correction
- if (lyxrc.autocorrection_math && cur.autocorrect() && cur.pos() != 0 && math_autocorrect(cur.prevAtom(), c))
+ if (lyxrc.autocorrection_math && cur.autocorrect() && cur.pos() != 0
+ && math_autocorrect(cur.prevAtom(), c))
return true;
// no special circumstances, so insert the character without any fuss
globals.push_back(from_ascii("\\color"));
globals.push_back(from_ascii("\\normalcolor"));
globals.push_back(from_ascii("\\textcolor"));
+ globals.push_back(from_ascii("\\cfrac"));
globals.push_back(from_ascii("\\dfrac"));
globals.push_back(from_ascii("\\tfrac"));
globals.push_back(from_ascii("\\dbinom"));