]> git.lyx.org Git - lyx.git/commitdiff
Improve math-mode lfun for switching to text
authorGuillaume Munch <gadmm@free.fr>
Sun, 23 Aug 2015 09:10:05 +0000 (11:10 +0200)
committerGeorg Baum <baum@lyx.org>
Sun, 23 Aug 2015 09:10:05 +0000 (11:10 +0200)
math-mode inserts \text instead of \mbox when already in math mode,
since this supports accented characters.

src/mathed/BUGS
src/mathed/InsetMathNest.cpp

index fc6873c0881ef5c569dc7bd6f916ae9d9d38a20b..b94eaf1fe8961abb39873e5f1b5de6e46474a37d 100644 (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...
 
 
-Yves Bastide:
-
-- use AMS's \text instead of \mbox.  It supports accented characters,
-  among others...  (selected via validate()?)
-
 
 Angus:
 
index bef68dc5add25c83eb1550eb5e7fbb0e562c3af5..6382f1cf84caaf6a3a66798feec4cca04828be67 100644 (file)
@@ -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);