Re: [PATCH] Minipage removal

2003-12-30 Thread Georg Baum
Am Montag, 29. Dezember 2003 16:16 schrieb Angus Leeming:
> What I meant was that this 'removal of InsetMinipage/conversion of
> InsetMinipage to InsetBox' is a format change and so should
> 1 be documented
> 2 be placed in its own lyx2lyx files, lyxconvert_228.py and
> lyxrevert_229.py.

'removal of InsetMinipage' is certainly a format change. But this change did 
not happen now, it was commited by Jürgen on 14 Dec 2003. The format should 
have been bumped up with that patch. Since Angus did increase the format 
number on 15 Dec 2003 to 228 we can assume that 227 contains minipage 
insets and 228 does not.

I believe that 'conversion of InsetMinipage to InsetBox' is no format change 
in this case: Formats 225, 226 and 227 contain both the minipage inset and 
the box inset. This means that it does not matter wether minipages are 
converted to boxes between 225 -> 226 or 226 -> 227. They _must_ be 
converted from 227 to 228. The conversion box -> minipage _may_ happen from 
228 to 227 and from 227 to 226, and it _must_ happen from 225 to 224.

The fact that the lyx2lyx conversion happened in the wrong place until now 
is a bug of lyx2lyx. Subsequently declaring format 228 to have a minipage 
inset does not help, because LyX can't read minipages in 228.
So in my opinion this particular format change was not necessary.

Hope this helps to clarify things and does not create more confusion ;-)


Georg




Re: [PATCH] Minipage removal

2003-12-29 Thread Juergen Spitzmueller
Angus Leeming wrote:
> > Is the attached better?
>
> My opinion? 

If you are in the mood...

> Yes. 

OK, then I apply this and hope to close the chapter "minipage insets" finally.

Jürgen.


Re: [PATCH] Minipage removal

2003-12-29 Thread Angus Leeming
Juergen Spitzmueller wrote:
>> The bare bones lyxconvert_228.py and lyxrevert_229.py are pointless
>> (as you say). Personally I'd move the conversion code into them.
>> The more of these tiny files we have, the more likely José is to
>> come up with a versioning system that separates file from format
>> number ;-)
> 
> Is the attached better?

My opinion? Yes.

-- 
Angus



Re: [PATCH] Minipage removal

2003-12-29 Thread Juergen Spitzmueller
Angus Leeming wrote:
> What I meant was that this 'removal of InsetMinipage/conversion of
> InsetMinipage to InsetBox' is a format change and so should
> 1 be documented
> 2 be placed in its own lyx2lyx files, lyxconvert_228.py and
> lyxrevert_229.py.

Yes, this is certainly much cleaner.

> The bare bones lyxconvert_228.py and lyxrevert_229.py are pointless
> (as you say). Personally I'd move the conversion code into them. The
> more of these tiny files we have, the more likely José is to come up
> with a versioning system that separates file from format number ;-)

Is the attached better?

Jürgen.
Index: development/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/development/ChangeLog,v
retrieving revision 1.40
diff -u -r1.40 ChangeLog
--- development/ChangeLog	15 Dec 2003 22:04:31 -	1.40
+++ development/ChangeLog	29 Dec 2003 15:28:00 -
@@ -1,3 +1,7 @@
+2003-12-29  Jürgen Spitzmüller  <[EMAIL PROTECTED]>
+
+	* FORMAT: document change to format 229.
+	
 2003-12-15  Angus Leeming  <[EMAIL PROTECTED]>
 
 	* FORMAT: document change to format 228.
Index: development/FORMAT
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/development/FORMAT,v
retrieving revision 1.20
diff -u -r1.20 FORMAT
--- development/FORMAT	15 Dec 2003 22:04:31 -	1.20
+++ development/FORMAT	29 Dec 2003 15:28:01 -
@@ -1,6 +1,12 @@
 LyX file-format changes
 ---
 
+2003-12-29  Jürgen Spitzmüller  <[EMAIL PROTECTED]>
+
+	* format incremented to 229.
+	* Minipages cannot be read anymore. All minipage insets will
+	be converted to frameless box insets between 228->229.
+
 2003-12-15  Angus Leeming  <[EMAIL PROTECTED]>
 
 	* format incremented to 228.
Index: lib/lyx2lyx/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/ChangeLog,v
retrieving revision 1.16
diff -u -r1.16 ChangeLog
--- lib/lyx2lyx/ChangeLog	29 Dec 2003 12:56:09 -	1.16
+++ lib/lyx2lyx/ChangeLog	29 Dec 2003 15:28:04 -
@@ -1,7 +1,9 @@
 2003-12-29  Jürgen Spitzmüller  <[EMAIL PROTECTED]>
 
+	* lyx2lyx: up the format to 229.
 	* lyxconvert_224.py (convert_minipage): remove function...
-	* lyxconvert_227.py: ...and place it here.
+	* lyxconvert_228.py: ...and place it here.
+	* lyxrevert_229.py: new file (bare bones).
 
 2003-12-19  Angus Leeming  <[EMAIL PROTECTED]>
 
Index: lib/lyx2lyx/lyx2lyx
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/lyx2lyx,v
retrieving revision 1.20
diff -u -r1.20 lyx2lyx
--- lib/lyx2lyx/lyx2lyx	15 Dec 2003 22:04:31 -	1.20
+++ lib/lyx2lyx/lyx2lyx	29 Dec 2003 15:28:04 -
@@ -40,7 +40,7 @@
 
 format = re.compile(r"(\d)[\.,]?(\d\d)")
 fileformat = re.compile(r"\\lyxformat\s*(\S*)")
-lst_ft = [210, 215, 216, 217,  218, 220, 221, 223, 224, 225, 226, 227, 228]
+lst_ft = [210, 215, 216, 217,  218, 220, 221, 223, 224, 225, 226, 227, 228, 229]
 
 def usage():
 print """Usage: lyx2lyx [options] [file]
Index: lib/lyx2lyx/lyxconvert_227.py
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/lyxconvert_227.py,v
retrieving revision 1.5
diff -u -r1.5 lyxconvert_227.py
--- lib/lyx2lyx/lyxconvert_227.py	29 Dec 2003 12:56:10 -	1.5
+++ lib/lyx2lyx/lyxconvert_227.py	29 Dec 2003 15:28:04 -
@@ -16,7 +16,7 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 import sys
-from parser_tools import find_token, find_tokens
+from parser_tools import find_tokens
 
 def convert_collapsable(lines):
 i = 0
@@ -52,72 +52,8 @@
 i = i + 1
 
 
-def convert_minipage(lines):
-""" Convert minipages to the box inset.
-We try to use the same order of arguments as lyx does.
-"""
-pos = ["t","c","b"]
-inner_pos = ["c","t","b","s"]
-
-i = 0
-while 1:
-i = find_token(lines, "\\begin_inset Minipage", i)
-if i == -1:
-return
-
-lines[i] = "\\begin_inset Box Frameless"
-i = i + 1
-
-# convert old to new position using the pos list
-if lines[i][:8] == "position":
-lines[i] = 'position "%s"' % pos[int(lines[i][9])]
-else:
-lines.insert(i, 'position "%s"' % pos[0])
-i = i + 1
-
-lines.insert(i, 'hor_pos "c"')
-i = i + 1
-lines.insert(i, 'has_inner_box 1')
-i = i + 1
-
-# convert the inner_position
-if lines[i][:14] == "inner_position":
-lines[i] = 'inner_pos "%s"' %  inner_pos[int(lines[i][15])]
-else:
-lines.insert('inner_pos "%s"' % inner_pos[0])
-i = i + 1
-
-# We need this since the new file format has a height and width
-# in a different order.
-if lines[i][:6] == "height":
-height = lines[i][6:]

Re: [PATCH] Minipage removal

2003-12-29 Thread Angus Leeming
Juergen Spitzmueller wrote:

> Angus Leeming wrote:
>> Could you increase the LyX format by one please (src/buffer.C) and
>> add a note to this effect in development/FORMAT. To that end, it
>> would probably be best to create new lyxconvert/lyxrevert files
>> too...
> 
> I don't quite understand why this is necessary here, but anyway.

What I meant was that this 'removal of InsetMinipage/conversion of 
InsetMinipage to InsetBox' is a format change and so should
1 be documented
2 be placed in its own lyx2lyx files, lyxconvert_228.py and 
lyxrevert_229.py.

> Can you have a look at the attached patch before I apply, please?

The bare bones lyxconvert_228.py and lyxrevert_229.py are pointless 
(as you say). Personally I'd move the conversion code into them. The 
more of these tiny files we have, the more likely José is to come up 
with a versioning system that separates file from format number ;-)

> Thanks,
> Jürgen.

-- 
Angus



Re: [PATCH] Minipage removal

2003-12-29 Thread Juergen Spitzmueller
Angus Leeming wrote:
> Could you increase the LyX format by one please (src/buffer.C) and add
> a note to this effect in development/FORMAT. To that end, it would
> probably be best to create new lyxconvert/lyxrevert files too...

I don't quite understand why this is necessary here, but anyway. Can you have 
a look at the attached patch before I apply, please?

Thanks,
Jürgen.
Index: development/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/development/ChangeLog,v
retrieving revision 1.40
diff -u -r1.40 ChangeLog
--- development/ChangeLog	15 Dec 2003 22:04:31 -	1.40
+++ development/ChangeLog	29 Dec 2003 14:50:25 -
@@ -1,3 +1,7 @@
+2003-12-29  Jürgen Spitzmüller  <[EMAIL PROTECTED]>
+
+	* FORMAT: document change to format 229.
+	
 2003-12-15  Angus Leeming  <[EMAIL PROTECTED]>
 
 	* FORMAT: document change to format 228.
Index: development/FORMAT
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/development/FORMAT,v
retrieving revision 1.20
diff -u -r1.20 FORMAT
--- development/FORMAT	15 Dec 2003 22:04:31 -	1.20
+++ development/FORMAT	29 Dec 2003 14:50:25 -
@@ -1,6 +1,11 @@
 LyX file-format changes
 ---
 
+2003-12-29  Jürgen Spitzmüller  <[EMAIL PROTECTED]>
+
+	* format incremented to 229.
+	* Minipages cannot be read anymore.
+
 2003-12-15  Angus Leeming  <[EMAIL PROTECTED]>
 
 	* format incremented to 228.
Index: lib/lyx2lyx/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/ChangeLog,v
retrieving revision 1.16
diff -u -r1.16 ChangeLog
--- lib/lyx2lyx/ChangeLog	29 Dec 2003 12:56:09 -	1.16
+++ lib/lyx2lyx/ChangeLog	29 Dec 2003 14:50:28 -
@@ -2,6 +2,9 @@
 
 	* lyxconvert_224.py (convert_minipage): remove function...
 	* lyxconvert_227.py: ...and place it here.
+	* lyx2lyx: up the format to 229.
+	* lyxconvert_228.py:
+	* lyxrevert_229.py: new files (bare bones).
 
 2003-12-19  Angus Leeming  <[EMAIL PROTECTED]>
 
Index: lib/lyx2lyx/lyx2lyx
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/lyx2lyx,v
retrieving revision 1.20
diff -u -r1.20 lyx2lyx
--- lib/lyx2lyx/lyx2lyx	15 Dec 2003 22:04:31 -	1.20
+++ lib/lyx2lyx/lyx2lyx	29 Dec 2003 14:50:29 -
@@ -40,7 +40,7 @@
 
 format = re.compile(r"(\d)[\.,]?(\d\d)")
 fileformat = re.compile(r"\\lyxformat\s*(\S*)")
-lst_ft = [210, 215, 216, 217,  218, 220, 221, 223, 224, 225, 226, 227, 228]
+lst_ft = [210, 215, 216, 217,  218, 220, 221, 223, 224, 225, 226, 227, 228, 229]
 
 def usage():
 print """Usage: lyx2lyx [options] [file]
Index: lib/lyx2lyx/lyxconvert_228.py
===
RCS file: lib/lyx2lyx/lyxconvert_228.py
diff -N lib/lyx2lyx/lyxconvert_228.py
--- /dev/null	1 Jan 1970 00:00:00 -
+++ lib/lyx2lyx/lyxconvert_228.py	29 Dec 2003 14:50:29 -
@@ -0,0 +1,24 @@
+# This file is part of lyx2lyx
+# Copyright (C) 2003 José Matos <[EMAIL PROTECTED]>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+
+
+def convert(header, body):
+pass
+
+if __name__ == "__main__":
+pass
Index: lib/lyx2lyx/lyxrevert_229.py
===
RCS file: lib/lyx2lyx/lyxrevert_229.py
diff -N lib/lyx2lyx/lyxrevert_229.py
--- /dev/null	1 Jan 1970 00:00:00 -
+++ lib/lyx2lyx/lyxrevert_229.py	29 Dec 2003 14:50:29 -
@@ -0,0 +1,24 @@
+# This file is part of lyx2lyx
+# Copyright (C) 2003 José Matos <[EMAIL PROTECTED]>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place 

Re: [PATCH] Minipage removal

2003-12-29 Thread Angus Leeming
Angus Leeming wrote:

> Juergen Spitzmueller wrote:
>> IMHO Michael's patch could go in now. Can I apply it?
> 
> Go for it.

I see you did indeed go for it.

Could you increase the LyX format by one please (src/buffer.C) and add 
a note to this effect in development/FORMAT. To that end, it would 
probably be best to create new lyxconvert/lyxrevert files too...

-- 
Angus



Re: [PATCH] Minipage removal

2003-12-29 Thread Angus Leeming
Juergen Spitzmueller wrote:
> IMHO Michael's patch could go in now. Can I apply it?

Go for it.

-- 
Angus



Re: [PATCH] Minipage removal

2003-12-29 Thread Juergen Spitzmueller
Jose' Matos wrote:
> The code look correct and all the individual converter are self-contained.
> The only thing that could go wrong is come missing import statement, but
> those seem ok.
>
>   Does it works?

Yes. It works on Kornel's test file.

>   If yes then apply it. :-)

Done. Thanks.
IMHO Michael's patch could go in now. Can I apply it?

Jürgen.


Re: [PATCH] Minipage removal

2003-12-29 Thread Jose' Matos
On Monday 29 December 2003 11:20, Juergen Spitzmueller wrote:
> Angus Leeming wrote:
> > My opinion? Move it.
>
> I do not much understand lyx2lyx. Is the attached correct?

  The code look correct and all the individual converter are self-contained. 
The only thing that could go wrong is come missing import statement, but 
those seem ok.

  Does it works?
  If yes then apply it. :-)
  
> Jürgen.

-- 
José Abílio

LyX and docbook, a perfect match. :-)



Re: [PATCH] Minipage removal

2003-12-29 Thread Juergen Spitzmueller
Angus Leeming wrote:
> My opinion? Move it.

I do not much understand lyx2lyx. Is the attached correct?

Jürgen.
Index: lyxconvert_224.py
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/lyxconvert_224.py,v
retrieving revision 1.14
diff -u -r1.14 lyxconvert_224.py
--- lyxconvert_224.py	3 Dec 2003 12:29:42 -	1.14
+++ lyxconvert_224.py	29 Dec 2003 11:22:06 -
@@ -105,70 +105,6 @@
 return
 lines[i] = "\\end_document"
 
-
-def convert_minipage(lines):
-""" Convert minipages to the box inset.
-We try to use the same order of arguments as lyx does.
-"""
-pos = ["t","c","b"]
-inner_pos = ["c","t","b","s"]
-
-i = 0
-while 1:
-i = find_token(lines, "\\begin_inset Minipage", i)
-if i == -1:
-return
-
-lines[i] = "\\begin_inset Frameless"
-i = i + 1
-
-# convert old to new position using the pos list
-if lines[i][:8] == "position":
-lines[i] = 'position "%s"' % pos[int(lines[i][9])]
-else:
-lines.insert(i, 'position "%s"' % pos[0])
-i = i + 1
-
-lines.insert(i, 'hor_pos "c"')
-i = i + 1
-lines.insert(i, 'has_inner_box 1')
-i = i + 1
-
-# convert the inner_position
-if lines[i][:14] == "inner_position":
-lines[i] = 'inner_pos "%s"' %  inner_pos[int(lines[i][15])]
-else:
-lines.insert('inner_pos "%s"' % inner_pos[0])
-i = i + 1
-
-# We need this since the new file format has a height and width
-# in a different order.
-if lines[i][:6] == "height":
-height = lines[i][6:]
-# test for default value of 221 and convert it accordingly
-if height == ' "0pt"':
-height = ' "1pt"'
-del lines[i]
-else:
-height = ' "1pt"'
-
-if lines[i][:5] == "width":
-width = lines[i][5:]
-del lines[i]
-else:
-width = ' "0"'
-
-lines.insert(i, 'use_parbox 0')
-i = i + 1
-lines.insert(i, 'width' + width)
-i = i + 1
-lines.insert(i, 'special "none"')
-i = i + 1
-lines.insert(i, 'height' + height)
-i = i + 1
-lines.insert(i, 'height_special "totalheight"')
-i = i + 1
-
 ##
 # Convert line and page breaks
 # Old:
@@ -289,7 +225,6 @@
 layout2begin_layout(body)
 end_document(body)
 table_valignment_middle(body)
-convert_minipage(body)
 convert_breaks(body)
 
 if __name__ == "__main__":
Index: lyxconvert_227.py
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/lyxconvert_227.py,v
retrieving revision 1.4
diff -u -r1.4 lyxconvert_227.py
--- lyxconvert_227.py	19 Dec 2003 21:38:07 -	1.4
+++ lyxconvert_227.py	29 Dec 2003 11:22:06 -
@@ -16,7 +16,7 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 import sys
-from parser_tools import find_tokens
+from parser_tools import find_token, find_tokens
 
 def convert_collapsable(lines):
 i = 0
@@ -51,8 +51,73 @@
 
 i = i + 1
 
+
+def convert_minipage(lines):
+""" Convert minipages to the box inset.
+We try to use the same order of arguments as lyx does.
+"""
+pos = ["t","c","b"]
+inner_pos = ["c","t","b","s"]
+
+i = 0
+while 1:
+i = find_token(lines, "\\begin_inset Minipage", i)
+if i == -1:
+return
+
+lines[i] = "\\begin_inset Box Frameless"
+i = i + 1
+
+# convert old to new position using the pos list
+if lines[i][:8] == "position":
+lines[i] = 'position "%s"' % pos[int(lines[i][9])]
+else:
+lines.insert(i, 'position "%s"' % pos[0])
+i = i + 1
+
+lines.insert(i, 'hor_pos "c"')
+i = i + 1
+lines.insert(i, 'has_inner_box 1')
+i = i + 1
+
+# convert the inner_position
+if lines[i][:14] == "inner_position":
+lines[i] = 'inner_pos "%s"' %  inner_pos[int(lines[i][15])]
+else:
+lines.insert('inner_pos "%s"' % inner_pos[0])
+i = i + 1
+
+# We need this since the new file format has a height and width
+# in a different order.
+if lines[i][:6] == "height":
+height = lines[i][6:]
+# test for default value of 221 and convert it accordingly
+if height == ' "0pt"':
+height = ' "1pt"'
+del lines[i]
+else:
+height = ' "1pt"'
+
+if lines[i][:5] == "width":
+width = lines[i][5:]
+del lines[i]
+else:
+width = ' "0"'
+
+lines.insert(i, 'use_parbox 0')
+i = i + 1
+lines.insert(i, 'width' + width)
+i = i + 1
+lines.insert(i, 'special "none"')
+

Re: [PATCH] Minipage removal

2003-12-29 Thread Angus Leeming
Juergen Spitzmueller wrote:
> about bleeding edge file formats or not? (the slution would be easy,
> as proposed by Angus: just move the conversion from
> lyxconvert_224.py to lyxconvert_227.py).

My opinion? Move it. 
-- 
Angus



Re: [PATCH] Minipage removal

2003-12-29 Thread Juergen Spitzmueller
Michael Schmitt wrote:
> Hm... I think there _is_ a minipage->box conversion available in
> lyxconvert_224.py. Loading a LyX 1.3.4 document works as expected, at
> least. So what exactly is missing?

OK, short summary: The problem is that the minipage->box conversion happens 
from 223->224 while 225 and 226 could still produce minipages (via minibuffer 
and tex2lyx). This means that there might be some documents who are not read 
in correctly.
Try this example file from Kornel:
http://marc.theaimsgroup.com/?l=lyx-devel&m=107072337127639&w=2
Without your patch, it is read in as a framebox with wrong values, but at 
least the content is not lost. The question is: do we care about bleeding 
edge file formats or not? (the slution would be easy, as proposed by Angus: 
just move the conversion from lyxconvert_224.py to lyxconvert_227.py).

Jürgen.


Re: [PATCH] Minipage removal

2003-12-22 Thread Michael Schmitt
Michael Schmitt wrote:
Juergen Spitzmueller wrote:

I think this can go in. Don't know what Angus' current plans about
moving the minipage->box conversion from 225 to 228 are, though. So
I'd wait for his vote.


If all this patch does is prevent new Miniboxes being created, then 
great. Of course I vote for it to go in. However, as I read it, it 
prevents minipages in existing documents from being read. As no 
conversion script minipage->box exists, then of course that means it 
can't go in.


Hm... I think there _is_ a minipage->box conversion available in 
lyxconvert_224.py. Loading a LyX 1.3.4 document works as expected, at 
least. So what exactly is missing?

Enclosed please find a slightly modified patch again the current HEAD 
that "improves" the button label for boxes (the text "parbox" or 
"minipage" alone is a bit misleading UI-wise, especially as you may 
think that minipages are still alive).

If there are no objections, please apply. Otherwise, please let me.
   ^
Ooops... "know" is missing :-)


Re: [PATCH] Minipage removal

2003-12-22 Thread Martin Vermeer
On Mon, Dec 22, 2003 at 03:58:52PM +0100, Michael Schmitt spake thusly:

> Enclosed please find a slightly modified patch again the current HEAD 
> that "improves" the button label for boxes (the text "parbox" or 
> "minipage" alone is a bit misleading UI-wise, especially as you may 
> think that minipages are still alive).

Good idea.

- Martin


pgp0.pgp
Description: PGP signature


Re: [PATCH] Minipage removal

2003-12-22 Thread Michael Schmitt
Juergen Spitzmueller wrote:

I think this can go in. Don't know what Angus' current plans about
moving the minipage->box conversion from 225 to 228 are, though. So
I'd wait for his vote.
If all this patch does is prevent new Miniboxes being created, then 
great. Of course I vote for it to go in. However, as I read it, it 
prevents minipages in existing documents from being read. As no 
conversion script minipage->box exists, then of course that means it 
can't go in.
Hm... I think there _is_ a minipage->box conversion available in 
lyxconvert_224.py. Loading a LyX 1.3.4 document works as expected, at 
least. So what exactly is missing?

Enclosed please find a slightly modified patch again the current HEAD 
that "improves" the button label for boxes (the text "parbox" or 
"minipage" alone is a bit misleading UI-wise, especially as you may 
think that minipages are still alive).

If there are no objections, please apply. Otherwise, please let me.

Regards, Michael

Index: src/ChangeLog
===
RCS file: /cvs/lyx/lyx-devel/src/ChangeLog,v
retrieving revision 1.1758
diff -u -r1.1758 ChangeLog
--- src/ChangeLog   2003/12/20 00:24:30 1.1758
+++ src/ChangeLog   2003/12/22 14:24:30
@@ -1,3 +1,13 @@
+2003-12-14  Michael Schmitt  <[EMAIL PROTECTED]>
+
+   * LaTeXFeatures.C:
+   * lyx_sty.[Ch]: remove minipageindent_def
+
+   * LyXAction.C:
+   * factory.C:
+   * lfuns.h:
+   * lyxfunc.C:
+   * text3.C: remove LFUN_INSET_MINIPAGE
 
 2003-12-19  Alfredo Braunstein  <[EMAIL PROTECTED]>
 
Index: src/LaTeXFeatures.C
===
RCS file: /cvs/lyx/lyx-devel/src/LaTeXFeatures.C,v
retrieving revision 1.101
diff -u -r1.101 LaTeXFeatures.C
--- src/LaTeXFeatures.C 2003/11/12 14:38:24 1.101
+++ src/LaTeXFeatures.C 2003/12/22 14:24:32
@@ -357,8 +357,6 @@
macros << mathcircumflex_def << '\n';
 
// other
-   if (isRequired("NeedLyXMinipageIndent"))
-   macros << minipageindent_def;
if (isRequired("ParagraphLeftIndent"))
macros << paragraphleftindent_def;
if (isRequired("NeedLyXFootnoteCode"))
Index: src/LyXAction.C
===
RCS file: /cvs/lyx/lyx-devel/src/LyXAction.C,v
retrieving revision 1.189
diff -u -r1.189 LyXAction.C
--- src/LyXAction.C 2003/11/12 14:38:24 1.189
+++ src/LyXAction.C 2003/12/22 14:24:33
@@ -224,7 +224,6 @@
{ LFUN_MENU_OPEN_BY_NAME, "menu-open", NoBuffer },
{ LFUN_MENU_SEPARATOR, "menu-separator-insert", Noop },
{ LFUN_META_FAKE, "meta-prefix", NoBuffer },
-   { LFUN_INSET_MINIPAGE, "minipage-insert", Noop },
{ LFUN_INSERT_BRANCH, "branch-insert", Noop },
{ LFUN_INSERT_CHARSTYLE, "charstyle-insert", Noop },
{ LFUN_INSERT_NOTE, "note-insert", Noop },
Index: src/factory.C
===
RCS file: /cvs/lyx/lyx-devel/src/factory.C,v
retrieving revision 1.79
diff -u -r1.79 factory.C
--- src/factory.C   2003/12/14 16:33:51 1.79
+++ src/factory.C   2003/12/22 14:24:34
@@ -84,9 +84,6 @@
case LFUN_INSERT_PAGEBREAK:
return new InsetPagebreak;
 
-   case LFUN_INSET_MINIPAGE:
-   return new InsetBox(params, "Frameless");
-
case LFUN_INSERT_CHARSTYLE: {
string s = cmd.getArg(0);
CharStyles::iterator found_cs = params.getLyXTextClass().charstyle(s);
@@ -443,8 +440,6 @@
inset.reset(new InsetMarginal(buf.params()));
} else if (tmptok == "OptArg") {
inset.reset(new InsetOptArg(buf.params()));
-   } else if (tmptok == "Minipage") {
-   inset.reset(new InsetBox(buf.params(), "Frameless"));
} else if (tmptok == "Float") {
lex.next();
string tmptok = lex.getString();
Index: src/lfuns.h
===
RCS file: /cvs/lyx/lyx-devel/src/lfuns.h,v
retrieving revision 1.25
diff -u -r1.25 lfuns.h
--- src/lfuns.h 2003/11/28 15:53:23 1.25
+++ src/lfuns.h 2003/12/22 14:24:35
@@ -259,81 +259,80 @@
LFUN_LOAVIEW,   // Dekel 2519
LFUN_SET_COLOR, // SLior 2611
LFUN_INSET_MARGINAL,// Lgb 2626
-   LFUN_INSET_MINIPAGE,// Lgb 2627
-   // 195
LFUN_INSET_FLOAT,   // Lgb 2627
+   // 195
LFUN_INSET_WIDE_FLOAT,  // Lgb 20010531
LFUN_INSET_CAPTION, // Lgb 2718
LFUN_SWITCHBUFFER,
LFUN_TABULAR_FEATURE,   // Jug 2728
-   // 200
LFUN_LAYOUT_TABULAR,// Jug 2731
+   // 200

Re: [PATCH] Minipage removal

2003-12-21 Thread Angus Leeming
Juergen Spitzmueller wrote:

> Michael Schmitt wrote:
>> already on vacation?
> 
> not yet. but I'm packing my bags :-)
> 
>> What happened to my patch that removes LFUN_INSET_MINIPAGE and some
>> other unused cruft? I did not follow the discussion in details.
>> What needs to be done to commit this patch?
> 
> I think this can go in. Don't know what Angus' current plans about
> moving the minipage->box conversion from 225 to 228 are, though. So
> I'd wait for his vote.

If all this patch does is prevent new Miniboxes being created, then 
great. Of course I vote for it to go in. However, as I read it, it 
prevents minipages in existing documents from being read. As no 
conversion script minipage->box exists, then of course that means it 
can't go in.

Regards,
Angus (for whom writing computer code is also lower priority than 
maintaining family ties...)

> Jürgen
> (I am offline for a week now)

-- 
Angus



Re: [PATCH] Minipage removal

2003-12-20 Thread Juergen Spitzmueller
Michael Schmitt wrote:
> already on vacation?

not yet. but I'm packing my bags :-)

> What happened to my patch that removes LFUN_INSET_MINIPAGE and some
> other unused cruft? I did not follow the discussion in details. What
> needs to be done to commit this patch?

I think this can go in. Don't know what Angus' current plans about moving the 
minipage->box conversion from 225 to 228 are, though. So I'd wait for his 
vote.

Jürgen

(I am offline for a week now)


[PATCH] Minipage removal

2003-12-19 Thread Michael Schmitt
Hello everybody,

already on vacation?

What happened to my patch that removes LFUN_INSET_MINIPAGE and some 
other unused cruft? I did not follow the discussion in details. What 
needs to be done to commit this patch?

Anyway, here it comes again.

Regards from snowless Bitburg, Germany,

Michael
Index: src/ChangeLog
===
RCS file: /cvs/lyx/lyx-devel/src/ChangeLog,v
retrieving revision 1.1757
diff -u -r1.1757 ChangeLog
--- src/ChangeLog   2003/12/18 12:42:02 1.1757
+++ src/ChangeLog   2003/12/19 21:58:44
@@ -1,3 +1,14 @@
+2003-12-14  Michael Schmitt  <[EMAIL PROTECTED]>
+
+   * LaTeXFeatures.C:
+   * lyx_sty.[Ch]: remove minipageindent_def
+
+   * LyXAction.C:
+   * factory.C:
+   * lfuns.h:
+   * lyxfunc.C:
+   * text3.C: remove LFUN_INSET_MINIPAGE
+
 2003-12-18  Martin Vermeer  <[EMAIL PROTECTED]>
 
* output_docbook.C: header stuff for AGU
Index: src/LaTeXFeatures.C
===
RCS file: /cvs/lyx/lyx-devel/src/LaTeXFeatures.C,v
retrieving revision 1.101
diff -u -r1.101 LaTeXFeatures.C
--- src/LaTeXFeatures.C 2003/11/12 14:38:24 1.101
+++ src/LaTeXFeatures.C 2003/12/19 21:58:46
@@ -357,8 +357,6 @@
macros << mathcircumflex_def << '\n';
 
// other
-   if (isRequired("NeedLyXMinipageIndent"))
-   macros << minipageindent_def;
if (isRequired("ParagraphLeftIndent"))
macros << paragraphleftindent_def;
if (isRequired("NeedLyXFootnoteCode"))
Index: src/LyXAction.C
===
RCS file: /cvs/lyx/lyx-devel/src/LyXAction.C,v
retrieving revision 1.189
diff -u -r1.189 LyXAction.C
--- src/LyXAction.C 2003/11/12 14:38:24 1.189
+++ src/LyXAction.C 2003/12/19 21:58:47
@@ -224,13 +224,12 @@
{ LFUN_MENU_OPEN_BY_NAME, "menu-open", NoBuffer },
{ LFUN_MENU_SEPARATOR, "menu-separator-insert", Noop },
{ LFUN_META_FAKE, "meta-prefix", NoBuffer },
-   { LFUN_INSET_MINIPAGE, "minipage-insert", Noop },
{ LFUN_INSERT_BRANCH, "branch-insert", Noop },
{ LFUN_INSERT_CHARSTYLE, "charstyle-insert", Noop },
{ LFUN_INSERT_NOTE, "note-insert", Noop },
{ LFUN_INSERT_BOX, "box-insert", Noop },
{ LFUN_GOTONOTE, "note-next", ReadOnly },
{ LFUN_INSET_TOGGLE, "inset-toggle", ReadOnly },
{ LFUN_DOWN_PARAGRAPH, "paragraph-down", ReadOnly },
{ LFUN_DOWN_PARAGRAPHSEL, "paragraph-down-select", ReadOnly },
{ LFUN_GOTO_PARAGRAPH, "paragraph-goto", ReadOnly },
Index: src/factory.C
===
RCS file: /cvs/lyx/lyx-devel/src/factory.C,v
retrieving revision 1.79
diff -u -r1.79 factory.C
--- src/factory.C   2003/12/14 16:33:51 1.79
+++ src/factory.C   2003/12/19 21:58:48
@@ -84,9 +84,6 @@
case LFUN_INSERT_PAGEBREAK:
return new InsetPagebreak;
 
-   case LFUN_INSET_MINIPAGE:
-   return new InsetBox(params, "Frameless");
-
case LFUN_INSERT_CHARSTYLE: {
string s = cmd.getArg(0);
CharStyles::iterator found_cs = params.getLyXTextClass().charstyle(s);
@@ -443,8 +440,6 @@
inset.reset(new InsetMarginal(buf.params()));
} else if (tmptok == "OptArg") {
inset.reset(new InsetOptArg(buf.params()));
-   } else if (tmptok == "Minipage") {
-   inset.reset(new InsetBox(buf.params(), "Frameless"));
} else if (tmptok == "Float") {
lex.next();
string tmptok = lex.getString();
Index: src/lfuns.h
===
RCS file: /cvs/lyx/lyx-devel/src/lfuns.h,v
retrieving revision 1.25
diff -u -r1.25 lfuns.h
--- src/lfuns.h 2003/11/28 15:53:23 1.25
+++ src/lfuns.h 2003/12/19 21:58:48
@@ -259,81 +260,80 @@
LFUN_LOAVIEW,   // Dekel 2519
LFUN_SET_COLOR, // SLior 2611
LFUN_INSET_MARGINAL,// Lgb 2626
-   LFUN_INSET_MINIPAGE,// Lgb 2627
-   // 195
LFUN_INSET_FLOAT,   // Lgb 2627
+   // 195
LFUN_INSET_WIDE_FLOAT,  // Lgb 20010531
LFUN_INSET_CAPTION, // Lgb 2718
LFUN_SWITCHBUFFER,
LFUN_TABULAR_FEATURE,   // Jug 2728
-   // 200
LFUN_LAYOUT_TABULAR,// Jug 2731
+   // 200
LFUN_SCROLL_INSET,  // Jug 2801
LFUN_UPDATE,// Dekel 2805
LFUN_INDEX_INSERT,  // Angus 2803
LFUN_SCREEN_FONT_UPDATE,// ARRae 2813
-   /