Martin Vermeer wrote:

> Ah yes, I see that. Perhaps we should just disable the fonts inside an
> mbox inset for now... usually we just want to be able to embed short
> textual remarks in a formula like
> 
>                              1 if i = j
> the Kronecker \delta^i_j = {
>                              0 otherwise
> 
> ...preferably with umlauted letters allowed. At least that works now.

I disagree. The solution that my patch implements is exactly what we had in
1.3. If it was good enough for 1.3, it is also good enough for 1.4. We
should make the "real" solution" (MathMBoxInset) work in the next
development version instead of wasting time with an intermediate solution.


Georg
Index: src/mathed/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/ChangeLog,v
retrieving revision 1.476
diff -u -p -r1.476 ChangeLog
--- src/mathed/ChangeLog	2 Mar 2005 14:26:12 -0000	1.476
+++ src/mathed/ChangeLog	16 Mar 2005 10:34:43 -0000
@@ -1,3 +1,12 @@
+2005-03-15  Georg Baum  <[EMAIL PROTECTED]>
+
+	* math_nestinset.C (doDispatch): create a MathBoxInset for mbox
+	rather than a MathMBoxInset, since the latter is not usable yet.
+	Fixes bug 1823.
+	* math_factory.C (createMathInset): Don't hardwire mbox, but read it
+	from lib/symbols again. This makes it possible to create other
+	"mbox-like" boxes.
+
 2005-03-02  Georg Baum  <[EMAIL PROTECTED]>
 
 	* math_parser.C (parse1): Don't parse "\|" following a "\left" or
Index: src/mathed/Makefile.am
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/Makefile.am,v
retrieving revision 1.140
diff -u -p -r1.140 Makefile.am
--- src/mathed/Makefile.am	14 Dec 2004 10:41:08 -0000	1.140
+++ src/mathed/Makefile.am	16 Mar 2005 10:34:43 -0000
@@ -100,8 +104,6 @@ libmathed_la_SOURCES = \
 	math_mathmlstream.h \
 	math_matrixinset.C \
 	math_matrixinset.h \
-	math_mboxinset.C \
-	math_mboxinset.h \
 	math_nestinset.C \
 	math_nestinset.h \
 	math_numberinset.C \
@@ -151,3 +153,6 @@ libmathed_la_SOURCES = \
 	command_inset.C \
 	ref_inset.h \
 	ref_inset.C
+#	math_mboxinset.C
+#	math_mboxinset.h
+
Index: src/mathed/math_factory.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_factory.C,v
retrieving revision 1.109
diff -u -p -r1.109 math_factory.C
--- src/mathed/math_factory.C	11 Nov 2004 12:01:34 -0000	1.109
+++ src/mathed/math_factory.C	16 Mar 2005 10:34:44 -0000
@@ -253,8 +254,12 @@ MathAtom createMathInset(string const & 
 			return MathAtom(new MathSpaceInset(l->name));
 		if (inset == "dots")
 			return MathAtom(new MathDotsInset(l));
-//		if (inset == "mbox")
-//			return MathAtom(new MathBoxInset(l->name));
+		if (inset == "mbox")
+			// return MathAtom(new MathMBoxInset);
+			// MathMBoxInset is proposed to replace MathBoxInset,
+			// but is not ready yet (it needs a BufferView for
+			// construction)
+			return MathAtom(new MathBoxInset(l->name));
 //		if (inset == "fbox")
 //			return MathAtom(new MathFboxInset(l));
 		if (inset == "style")
@@ -275,8 +280,6 @@ MathAtom createMathInset(string const & 
 		return MathAtom(new MathMacroArgument(s[2] - '0'));
 	if (s == "boxed")
 		return MathAtom(new MathBoxedInset());
-	if (s == "mbox")
-		return MathAtom(new MathBoxInset("mbox"));
 	if (s == "fbox")
 		return MathAtom(new MathFboxInset());
 	if (s == "framebox")
Index: src/mathed/math_nestinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_nestinset.C,v
retrieving revision 1.146
diff -u -p -r1.146 math_nestinset.C
--- src/mathed/math_nestinset.C	28 Feb 2005 11:32:58 -0000	1.146
+++ src/mathed/math_nestinset.C	16 Mar 2005 10:34:44 -0000
@@ -13,6 +13,7 @@
 #include "math_nestinset.h"
 
 #include "math_arrayinset.h"
+#include "math_boxinset.h"
 #include "math_braceinset.h"
 #include "math_commentinset.h"
 #include "math_data.h"
@@ -21,7 +22,7 @@
 #include "math_hullinset.h"
 #include "math_mathmlstream.h"
 #include "math_macroarg.h"
-#include "math_mboxinset.h"
+//#include "math_mboxinset.h"
 #include "math_parser.h"
 #include "math_scriptinset.h"
 #include "math_spaceinset.h"
@@ -712,7 +713,8 @@ void MathNestInset::doDispatch(LCursor &
 			break;
 		cur.macroModeClose();
 		selClearOrDel(cur);
-		cur.plainInsert(MathAtom(new MathMBoxInset(cur.bv())));
+		//cur.plainInsert(MathAtom(new MathMBoxInset(cur.bv())));
+		cur.plainInsert(MathAtom(new MathBoxInset("mbox")));
 		cur.posLeft();
 		cur.pushLeft(*cur.nextInset());
 #else

Reply via email to