Separator
Submenu "Change Formula Type|F" "edit_math_mutate"
Separator
- Submenu "Text Style|T" "edit_math_textstyles"
+ Submenu "Text Style|T" "edit_math_fontstyles"
Separator
Submenu "Use Computer Algebra System|S" "edit_math_extern"
Separator
Item "Inline|I" "math-limits nolimits"
End
- Menu "edit_math_textstyles"
- Item "Math Normal Font|N" "math-insert \mathnormal"
+ Menu "edit_math_fontstyles"
+ Item "Math Normal Font|N" "math-font-style mathnormal"
Separator
- Item "Math Calligraphic Family|C" "math-insert \mathcal"
- Item "Math Fraktur Family|F" "math-insert \mathfrak"
- Item "Math Roman Family|R" "math-insert \mathrm"
- Item "Math Sans Serif Family|S" "math-insert \mathsf"
+ Item "Math Calligraphic Family|C" "math-font-style mathcal"
+ Item "Math Fraktur Family|F" "math-font-style mathfrak"
+ Item "Math Roman Family|R" "math-font-style mathrm"
+ Item "Math Sans Serif Family|S" "math-font-style mathsf"
Separator
- Item "Math Bold Series|B" "math-insert \mathbf"
+ Item "Math Bold Series|B" "math-font-style mathbf"
Separator
- Item "Text Normal Font|T" "math-insert \textnormal"
+ Item "Text Normal Font|T" "math-font-style textnormal"
Separator
- Item "Text Roman Family" "math-insert \textrm"
- Item "Text Sans Serif Family" "math-insert \textsf"
- Item "Text Typewriter Family" "math-insert \texttt"
+ Item "Text Roman Family" "math-font-style textrm"
+ Item "Text Sans Serif Family" "math-font-style textsf"
+ Item "Text Typewriter Family" "math-font-style texttt"
Separator
- Item "Text Bold Series" "math-insert \textbf"
- Item "Text Medium Series" "math-insert \textmd"
+ Item "Text Bold Series" "math-font-style textbf"
+ Item "Text Medium Series" "math-font-style textmd"
Separator
- Item "Text Italic Shape" "math-insert \textit"
- Item "Text Small Caps Shape" "math-insert \textsc"
- Item "Text Slanted Shape" "math-insert \textsl"
- Item "Text Upright Shape" "math-insert \textup"
+ Item "Text Italic Shape" "math-font-style textit"
+ Item "Text Small Caps Shape" "math-font-style textsc"
+ Item "Text Slanted Shape" "math-font-style textsl"
+ Item "Text Upright Shape" "math-font-style textup"
End
Menu "edit_math_extern"
* \endvar
*/
{ LFUN_MATH_SIZE, "math-size", Noop, Math },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_MATH_FONT_STYLE
+ * \li Action: Changes the text style used in math.
+ * \li Syntax: math-font-style <STYLE>
+ * \li Params: <STYLE>: mathnormal|mathcal|mathfrak|mathrm|mathsf|mathbf
+ |textnormal|textrm|textsf|texttt|textbf|textmd|textit
+ |textsc|textsl|textup
+ * \li Origin: vfr, 9 jan 2009
+ * \endvar
+ */
+ { LFUN_MATH_FONT_STYLE, "math-font-style", Noop, Math },
/*!
* \var lyx::FuncCode lyx::LFUN_MATH_MACRO_UNFOLD
* \li Action: Unfold a Math Macro.
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;