Garst R. Reese wrote:

> At the time of  the %t -> %text patch, something went weird with my
> mini-pages.
> Two minipages with 44%t separated by an hfil used to appear side by side
> in lyx.
> The %t went to pt, but changing it to %text made one appear under the
> other and lost half of the minipages. This could also be related to the
> isLineSeparator stuff. Definitely a regression. 


try the patch.

Herbert



-- 
http://www.lyx.org/help/
Index: src/insets/insetminipage.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetminipage.C,v
retrieving revision 1.46
diff -u -r1.46 insetminipage.C
--- src/insets/insetminipage.C  21 Mar 2002 17:09:49 -0000      1.46
+++ src/insets/insetminipage.C  28 Mar 2002 07:13:05 -0000
@@ -116,6 +116,23 @@
 }
 
 
+namespace {
+string const convertOldRelLength(string const & oldLength) 
+{
+       if (oldLength.find("c%") != string::npos)
+               return subst(oldLength,"c%","col%");
+       else if (oldLength.find("l%") != string::npos)
+               return subst(oldLength,"l%","line%");
+       else if (oldLength.find("p%") != string::npos)
+               return subst(oldLength,"p%","page%");
+       else if (oldLength.find("t%") != string::npos)
+               return subst(oldLength,"t%","text%");
+
+       return oldLength;
+}
+
+}      // end anon
+
 void InsetMinipage::read(Buffer const * buf, LyXLex & lex)
 {
        if (lex.isOK()) {
@@ -162,7 +179,7 @@
                string const token = lex.getString();
                if (token == "width") {
                        lex.next();
-                       width_ = LyXLength(lex.getString());
+                       width_ = LyXLength(convertOldRelLength(lex.getString()));
                } else {
                        lyxerr << "InsetMinipage::Read: Missing 'width'-tag!"
                                   << endl;

Reply via email to