From: Guillaume Munch Date: Sun, 23 Aug 2015 09:10:05 +0000 (+0200) Subject: Improve math-mode lfun for switching to text X-Git-Tag: 2.2.0alpha1~378 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=27f067dd9d2da4bff679e2b0493a5723d406e1a6;p=lyx.git 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. --- 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);