Improve math-mode lfun for switching to text

math-mode inserts \text instead of \mbox when already in math mode,
since this supports accented characters.
This commit is contained in:
Guillaume Munch 2015-08-23 11:10:05 +02:00 committed by Georg Baum
parent fde3963d99
commit 27f067dd9d
2 changed files with 1 additions and 6 deletions

View File

@ -65,11 +65,6 @@ The current macro system is clever, but could be neater. One improvement
I'd like is to let LyX know about TeX's scoping rules... I'd like is to let LyX know about TeX's scoping rules...
Yves Bastide:
- use AMS's \text instead of \mbox. It supports accented characters,
among others... (selected via validate()?)
Angus: Angus:

View File

@ -1010,7 +1010,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
if (currentMode() <= Inset::TEXT_MODE) if (currentMode() <= Inset::TEXT_MODE)
cur.plainInsert(MathAtom(new InsetMathEnsureMath(buffer_))); cur.plainInsert(MathAtom(new InsetMathEnsureMath(buffer_)));
else else
cur.plainInsert(MathAtom(new InsetMathBox(buffer_, from_ascii("mbox")))); cur.plainInsert(createInsetMath("text", buffer_));
cur.posBackward(); cur.posBackward();
cur.pushBackward(*cur.nextInset()); cur.pushBackward(*cur.nextInset());
cur.niceInsert(save_selection); cur.niceInsert(save_selection);