From 27f067dd9d2da4bff679e2b0493a5723d406e1a6 Mon Sep 17 00:00:00 2001 From: Guillaume Munch Date: Sun, 23 Aug 2015 11:10:05 +0200 Subject: [PATCH] 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. --- src/mathed/BUGS | 5 ----- src/mathed/InsetMathNest.cpp | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/mathed/BUGS b/src/mathed/BUGS index fc6873c088..b94eaf1fe8 100644 --- a/src/mathed/BUGS +++ b/src/mathed/BUGS @@ -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... -Yves Bastide: - -- use AMS's \text instead of \mbox. It supports accented characters, - among others... (selected via validate()?) - Angus: diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index bef68dc5ad..6382f1cf84 100644 --- a/src/mathed/InsetMathNest.cpp +++ b/src/mathed/InsetMathNest.cpp @@ -1010,7 +1010,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd) if (currentMode() <= Inset::TEXT_MODE) cur.plainInsert(MathAtom(new InsetMathEnsureMath(buffer_))); else - cur.plainInsert(MathAtom(new InsetMathBox(buffer_, from_ascii("mbox")))); + cur.plainInsert(createInsetMath("text", buffer_)); cur.posBackward(); cur.pushBackward(*cur.nextInset()); cur.niceInsert(save_selection);