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-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
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-develm=107072337127639w=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-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
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')
+i = i + 1
+lines.insert(i, 'height' + height)
+i = i + 1
+lines.insert(i, 

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
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 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 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 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 - Suite 330, Boston, MA  

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:
 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:]
-# test for default value of 221 and convert it 

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:
  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 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=107072337127639=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-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
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 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
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 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 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 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
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:
> 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:
>> 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:
> > 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-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
LFUN_SCROLL_INSET,  // Jug 

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
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 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
+   // 

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
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-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-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)


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)


Re: [PATCH] Minipage

2003-12-07 Thread Juergen Spitzmueller
Georg Baum wrote:
 Try it: Current LyX without your patch can read the minipages that tex2lyx
 currently produces (although they cannot be inserted via menu anymore).

Sure. But eventually minipage will disappear, and then the problem will arise 
anyway (unless lyx2lyx converts those rest-minipages to boxes between 225 and 
226). So the patch does not make anything worse.

Jürgen.



Re: [PATCH] Minipage

2003-12-07 Thread Juergen Spitzmueller
Kornel Benko wrote:
  can live with this. Nonetheless it was still possible to insert
 such a minipage in current CVS (without your patch of course)

 Function minipage-insert.

Yes. And that should not be possible in lyxformat 225. This is a bug IMHO.

Jürgen.



Re: [PATCH] Minipage

2003-12-07 Thread Juergen Spitzmueller
Georg Baum wrote:
> Try it: Current LyX without your patch can read the minipages that tex2lyx
> currently produces (although they cannot be inserted via menu anymore).

Sure. But eventually minipage will disappear, and then the problem will arise 
anyway (unless lyx2lyx converts those rest-minipages to boxes between 225 and 
226). So the patch does not make anything worse.

Jürgen.



Re: [PATCH] Minipage

2003-12-07 Thread Juergen Spitzmueller
Kornel Benko wrote:
>  can live with this. Nonetheless it was still possible to insert
> such a minipage in current CVS (without your patch of course)
>
> Function "minipage-insert".

Yes. And that should not be possible in lyxformat 225. This is a bug IMHO.

Jürgen.



Re: [PATCH] Minipage

2003-12-06 Thread Kornel Benko
-BEGIN PGP SIGNED MESSAGE-

On Samstag, 6. Dezember 2003 12:26, Juergen Spitzmueller wrote:
 One for Angus...
 Now that the box inset superceeded minipage, it can theoretically be removed 
 (or should we wait a bit)?

With this patch, the minipages are read in as boxed.
Also the width of this inset is changed to 100 col%. (With the
CVS-Version the value is 70 col%)

Should I try to provide a test-file?

 Jürgen.
 
Kornel
- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iQCVAwUBP9HWjLewfbDGmeqhAQFKRwP9E7nsyhPrPn4ynqsFGOC58LCXpkDT2eAw
oUsC4MEFWpH75/XtYE1AJ5Nfc+nJSy3of6joKeFF/h6RWPB4GTcaa+f2O2o3xKA8
dLXnqNf4o38n0/VWkTB9QQeXw8Po/d1rUf7564PeuyBadnBtl5jpeeFxltXNGLaZ
EGOtYSYzFSc=
=5U5k
-END PGP SIGNATURE-



Re: [PATCH] Minipage

2003-12-06 Thread Georg Baum
Juergen Spitzmueller wrote:

 One for Angus...
 Now that the box inset superceeded minipage, it can theoretically be
 removed (or should we wait a bit)?

Yes please, until tex2lyx is adapted to output the box inset instead of
minipage.


Georg



Re: [PATCH] Minipage

2003-12-06 Thread Juergen Spitzmueller
Georg Baum wrote:
 (or should we wait a bit)?

 Yes please, until tex2lyx is adapted to output the box inset instead of
 minipage.

ok.
BTW what is the status of lyx2lyx in this regard? Do we need another file 
format change?

Jürgen.



Re: [PATCH] Minipage

2003-12-06 Thread Juergen Spitzmueller
Kornel Benko wrote:
 With this patch, the minipages are read in as boxed.
 Also the width of this inset is changed to 100 col%. (With the
 CVS-Version the value is 70 col%)

 Should I try to provide a test-file?

Yes please. I cannot reproduce. Here, a minipage from an 1.3.4 file with 
width=70 col% is read in correctly. Also examples/fr_Minipage.lyx. examples/
Minipage.lyx, however, is read in with a wrong width value, but this is the 
same in 1.3.4. Minipage.lyx uses width=45p%, which is not valid anymore 
(lyx2lyx issue?).

Thanks,
Jürgen.



Re: [PATCH] Minipage

2003-12-06 Thread Kornel Benko
-BEGIN PGP SIGNED MESSAGE-

On Samstag, 6. Dezember 2003 15:51, Juergen Spitzmueller wrote:
 Kornel Benko wrote:
  With this patch, the minipages are read in as boxed.
  Also the width of this inset is changed to 100 col%. (With the
  CVS-Version the value is 70 col%)
 
  Should I try to provide a test-file?
 
 Yes please. I cannot reproduce. Here, a minipage from an 1.3.4 file with 
 width=70 col% is read in correctly. Also examples/fr_Minipage.lyx. examples/
 Minipage.lyx, however, is read in with a wrong width value, but this is the 
 same in 1.3.4. Minipage.lyx uses width=45p%, which is not valid anymore 
 (lyx2lyx issue?).

This minipage example is a left over of previous lyx-1.4cvs versions.

Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iQCVAwUBP9Hug7ewfbDGmeqhAQGkCAP/R4kbMITD0u0blIJLJafBp6cMt7BXPzsP
6ouYQEIhrn2fIoWbXZguqvEA4L/UdblYCJFlMILTZWhEX6/ZSIYjwNTG3LJZ4Uge
jlDnzejayhmS79M71cmV1yvDr61LEb7EZAy1YclIVJRUC1hHMYihtzE5bQjyXAFE
LZnEbSK6gNE=
=30sZ
-END PGP SIGNATURE-
#LyX 1.4.0cvs created this file. For more info see http://www.lyx.org/
\lyxformat 225
\textclass article
\begin_preamble

\end_preamble
\language ngerman
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize default
\spacing single 
\papersize Default
\paperpackage a4
\use_geometry 0
\use_amsmath 1
\use_natbib 0
\use_numerical_citations 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation skip
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default
\bullet 2
	0
	9
	-1
\end_bullet
\tracking_changes 0
\end_header

\begin_layout Standard
\align center 

\begin_inset Minipage
position 1
inner_position 0
height 0pt
width 70col%
collapsed false

\begin_layout Standard

oa_test soll ein plattformunabhngiges Testtool fr Optical Archive auf
 Basis des C++ Toolkits sein.
 Es benutzt die aktuelle Version von OA fr Linux in der Version 2.1 mit
 kleinen Anpassungen.
\end_layout

\end_inset 


\end_layout

\end_document


Re: [PATCH] Minipage

2003-12-06 Thread Juergen Spitzmueller
Kornel Benko wrote:
 This minipage example is a left over of previous lyx-1.4cvs versions.

OK, your file has \lyxformat 225, while the Minipage-(Frameless) Boxes 
conversion is 223 - 225. I'd say this is a bleeding edge result where I'd 
leave you on your own. If you change \lyxformat to 223, the minipage is read 
in correctly (also the width).

Thanks,
Jürgen.



Re: [PATCH] Minipage

2003-12-06 Thread Juergen Spitzmueller
Juergen Spitzmueller wrote:
 Minipage.lyx, however, is read in with a wrong width value, but this is the
 same in 1.3.4. Minipage.lyx uses width=45p%, which is not valid anymore
 (lyx2lyx issue?).

This is where this changed btw:
http://www.lyx.org/cgi-bin/viewcvs.cgi/lyx-devel/src/
lengthcommon.C.diff?r1=1.2r2=1.3

Regards,
Jürgen



Re: [PATCH] Minipage

2003-12-06 Thread Juergen Spitzmueller
Georg Baum wrote:
 Yes please, until tex2lyx is adapted to output the box inset instead of
 minipage.

Hm, my patch does not make anything worse. tex2lyx produces \lyxformat 225 
files, while lyx2lyx's minipage-box conversion happens between 223 and 225. 
So files with minipages produced with this version of tex2lyx will cause 
problems (as Kornel's file) in any case, unless we bump version to 226 and 
shift the minipage-box conversion to 225-226.

Jürgen.



Re: [PATCH] Minipage

2003-12-06 Thread Juergen Spitzmueller
Juergen Spitzmueller wrote:
 BTW what is the status of lyx2lyx in this regard? Do we need another file
 format change?

I found it.

Jürgen



Re: [PATCH] Minipage

2003-12-06 Thread Kornel Benko
-BEGIN PGP SIGNED MESSAGE-

On Samstag, 6. Dezember 2003 16:33, Juergen Spitzmueller wrote:
 Kornel Benko wrote:
  This minipage example is a left over of previous lyx-1.4cvs versions.
 
 OK, your file has \lyxformat 225, while the Minipage-(Frameless) Boxes 
 conversion is 223 - 225. I'd say this is a bleeding edge result where I'd 
 leave you on your own. If you change \lyxformat to 223, the minipage is read 
 in correctly (also the width).

I can live with this. Nonetheless it was still possible to insert
such a minipage in current CVS (without your patch of course)

Function minipage-insert.

Kornel
- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iQCVAwUBP9Iql7ewfbDGmeqhAQGf7gP9Hh8IdEUi1pcVP6bpa7jnRxci3Y+dbRuL
Lz4JeQ4wlLqzkBAFD//Nfpr/2eFsbCQGFtdz0eE/3g1HqtoZorkD2ZCcb4dX08+x
+4Yk5oTrUA1idblFi4rjLJUC2NthpfRT467A8DlECf4t6fNxom3MPP0LqhTntkIf
CB1nW8URgIM=
=wAhp
-END PGP SIGNATURE-



Re: [PATCH] Minipage

2003-12-06 Thread Georg Baum
Am Samstag, 6. Dezember 2003 15:36 schrieb Juergen Spitzmueller:
 BTW what is the status of lyx2lyx in this regard? Do we need another file
 format change?

We would have needed one when the box inset and the other changes were 
introduced. Now it is too late, because we have already several flavours 
of 225, and files do exist in these flavours. We gain nothing by creating 
a new file format subsequently now, we can as well declare the latest 225 
to be the real 225 and consider tex2lyx and earlier versions of lyx that 
implement a different flavour broken.

It would be nice if this could be handled better in the future.


Georg




Re: [PATCH] Minipage

2003-12-06 Thread Georg Baum
Am Samstag, 6. Dezember 2003 17:48 schrieb Juergen Spitzmueller:
 Georg Baum wrote:
  Yes please, until tex2lyx is adapted to output the box inset instead of
  minipage.

 Hm, my patch does not make anything worse. tex2lyx produces \lyxformat
 225 files, while lyx2lyx's minipage-box conversion happens between 223
 and 225. So files with minipages produced with this version of tex2lyx
 will cause problems (as Kornel's file) in any case, unless we bump
 version to 226 and shift the minipage-box conversion to 225-226.

Try it: Current LyX without your patch can read the minipages that tex2lyx 
currently produces (although they cannot be inserted via menu anymore).


Georg




Re: [PATCH] Minipage

2003-12-06 Thread Kornel Benko
-BEGIN PGP SIGNED MESSAGE-

On Samstag, 6. Dezember 2003 22:19, Georg Baum wrote:
 Am Samstag, 6. Dezember 2003 17:48 schrieb Juergen Spitzmueller:
  Georg Baum wrote:
   Yes please, until tex2lyx is adapted to output the box inset instead of
   minipage.
 
  Hm, my patch does not make anything worse. tex2lyx produces \lyxformat
  225 files, while lyx2lyx's minipage-box conversion happens between 223
  and 225. So files with minipages produced with this version of tex2lyx
  will cause problems (as Kornel's file) in any case, unless we bump
  version to 226 and shift the minipage-box conversion to 225-226.
 
 Try it: Current LyX without your patch can read the minipages that tex2lyx 
 currently produces (although they cannot be inserted via menu anymore).
 

You can produce them with
M-x minipage-insert


 Georg
 
Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iQCVAwUBP9JRjLewfbDGmeqhAQGP8wP/X86A9MKGq+4GwUhCvJalyU4edtNGucnC
4dLJEjz6iX3yQxbnLzqKPKmdsH7ckW5T8Xlul3/hR5Mob7aWI7A74glKS94Bg1wy
fhrCX5wZl/D+XhDZ/65RaQuIYIr7RwzbNWSFAE13Pc2aCdUHGM6rnB6mTBkqHZ9r
289PTaLo6pQ=
=CXE9
-END PGP SIGNATURE-



Re: [PATCH] Minipage

2003-12-06 Thread Kornel Benko
-BEGIN PGP SIGNED MESSAGE-

On Samstag, 6. Dezember 2003 12:26, Juergen Spitzmueller wrote:
> One for Angus...
> Now that the box inset superceeded minipage, it can theoretically be removed 
> (or should we wait a bit)?

With this patch, the minipages are read in as "boxed".
Also the width of this inset is changed to 100 col%. (With the
CVS-Version the value is 70 col%)

Should I try to provide a test-file?

> Jürgen.
> 
Kornel
- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iQCVAwUBP9HWjLewfbDGmeqhAQFKRwP9E7nsyhPrPn4ynqsFGOC58LCXpkDT2eAw
oUsC4MEFWpH75/XtYE1AJ5Nfc+nJSy3of6joKeFF/h6RWPB4GTcaa+f2O2o3xKA8
dLXnqNf4o38n0/VWkTB9QQeXw8Po/d1rUf7564PeuyBadnBtl5jpeeFxltXNGLaZ
EGOtYSYzFSc=
=5U5k
-END PGP SIGNATURE-



Re: [PATCH] Minipage

2003-12-06 Thread Georg Baum
Juergen Spitzmueller wrote:

> One for Angus...
> Now that the box inset superceeded minipage, it can theoretically be
> removed (or should we wait a bit)?

Yes please, until tex2lyx is adapted to output the box inset instead of
minipage.


Georg



Re: [PATCH] Minipage

2003-12-06 Thread Juergen Spitzmueller
Georg Baum wrote:
> (or should we wait a bit)?
>
> Yes please, until tex2lyx is adapted to output the box inset instead of
> minipage.

ok.
BTW what is the status of lyx2lyx in this regard? Do we need another file 
format change?

Jürgen.



Re: [PATCH] Minipage

2003-12-06 Thread Juergen Spitzmueller
Kornel Benko wrote:
> With this patch, the minipages are read in as "boxed".
> Also the width of this inset is changed to 100 col%. (With the
> CVS-Version the value is 70 col%)
>
> Should I try to provide a test-file?

Yes please. I cannot reproduce. Here, a minipage from an 1.3.4 file with 
width=70 col% is read in correctly. Also examples/fr_Minipage.lyx. examples/
Minipage.lyx, however, is read in with a wrong width value, but this is the 
same in 1.3.4. Minipage.lyx uses width="45p%", which is not valid anymore 
(lyx2lyx issue?).

Thanks,
Jürgen.



Re: [PATCH] Minipage

2003-12-06 Thread Kornel Benko
-BEGIN PGP SIGNED MESSAGE-

On Samstag, 6. Dezember 2003 15:51, Juergen Spitzmueller wrote:
> Kornel Benko wrote:
> > With this patch, the minipages are read in as "boxed".
> > Also the width of this inset is changed to 100 col%. (With the
> > CVS-Version the value is 70 col%)
> >
> > Should I try to provide a test-file?
> 
> Yes please. I cannot reproduce. Here, a minipage from an 1.3.4 file with 
> width=70 col% is read in correctly. Also examples/fr_Minipage.lyx. examples/
> Minipage.lyx, however, is read in with a wrong width value, but this is the 
> same in 1.3.4. Minipage.lyx uses width="45p%", which is not valid anymore 
> (lyx2lyx issue?).

This minipage example is a left over of previous lyx-1.4cvs versions.

Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iQCVAwUBP9Hug7ewfbDGmeqhAQGkCAP/R4kbMITD0u0blIJLJafBp6cMt7BXPzsP
6ouYQEIhrn2fIoWbXZguqvEA4L/UdblYCJFlMILTZWhEX6/ZSIYjwNTG3LJZ4Uge
jlDnzejayhmS79M71cmV1yvDr61LEb7EZAy1YclIVJRUC1hHMYihtzE5bQjyXAFE
LZnEbSK6gNE=
=30sZ
-END PGP SIGNATURE-
#LyX 1.4.0cvs created this file. For more info see http://www.lyx.org/
\lyxformat 225
\textclass article
\begin_preamble

\end_preamble
\language ngerman
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize default
\spacing single 
\papersize Default
\paperpackage a4
\use_geometry 0
\use_amsmath 1
\use_natbib 0
\use_numerical_citations 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation skip
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default
\bullet 2
	0
	9
	-1
\end_bullet
\tracking_changes 0
\end_header

\begin_layout Standard
\align center 

\begin_inset Minipage
position 1
inner_position 0
height "0pt"
width "70col%"
collapsed false

\begin_layout Standard

oa_test soll ein plattformunabhängiges Testtool für Optical Archive auf
 Basis des C++ Toolkits sein.
 Es benutzt die aktuelle Version von OA für Linux in der Version 2.1 mit
 kleinen Anpassungen.
\end_layout

\end_inset 


\end_layout

\end_document


Re: [PATCH] Minipage

2003-12-06 Thread Juergen Spitzmueller
Kornel Benko wrote:
> This minipage example is a left over of previous lyx-1.4cvs versions.

OK, your file has \lyxformat 225, while the Minipage->(Frameless) Boxes 
conversion is 223 -> 225. I'd say this is a bleeding edge result where I'd 
leave you on your own. If you change \lyxformat to 223, the minipage is read 
in correctly (also the width).

Thanks,
Jürgen.



Re: [PATCH] Minipage

2003-12-06 Thread Juergen Spitzmueller
Juergen Spitzmueller wrote:
> Minipage.lyx, however, is read in with a wrong width value, but this is the
> same in 1.3.4. Minipage.lyx uses width="45p%", which is not valid anymore
> (lyx2lyx issue?).

This is where this changed btw:
http://www.lyx.org/cgi-bin/viewcvs.cgi/lyx-devel/src/
lengthcommon.C.diff?r1=1.2=1.3

Regards,
Jürgen



Re: [PATCH] Minipage

2003-12-06 Thread Juergen Spitzmueller
Georg Baum wrote:
> Yes please, until tex2lyx is adapted to output the box inset instead of
> minipage.

Hm, my patch does not make anything worse. tex2lyx produces \lyxformat 225 
files, while lyx2lyx's minipage->box conversion happens between 223 and 225. 
So files with minipages produced with this version of tex2lyx will cause 
problems (as Kornel's file) in any case, unless we bump version to 226 and 
shift the minipage->box conversion to 225->226.

Jürgen.



Re: [PATCH] Minipage

2003-12-06 Thread Juergen Spitzmueller
Juergen Spitzmueller wrote:
> BTW what is the status of lyx2lyx in this regard? Do we need another file
> format change?

I found it.

Jürgen



Re: [PATCH] Minipage

2003-12-06 Thread Kornel Benko
-BEGIN PGP SIGNED MESSAGE-

On Samstag, 6. Dezember 2003 16:33, Juergen Spitzmueller wrote:
> Kornel Benko wrote:
> > This minipage example is a left over of previous lyx-1.4cvs versions.
> 
> OK, your file has \lyxformat 225, while the Minipage->(Frameless) Boxes 
> conversion is 223 -> 225. I'd say this is a bleeding edge result where I'd 
> leave you on your own. If you change \lyxformat to 223, the minipage is read 
> in correctly (also the width).

I can live with this. Nonetheless it was still possible to insert
such a minipage in current CVS (without your patch of course)

Function "minipage-insert".

Kornel
- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iQCVAwUBP9Iql7ewfbDGmeqhAQGf7gP9Hh8IdEUi1pcVP6bpa7jnRxci3Y+dbRuL
Lz4JeQ4wlLqzkBAFD//Nfpr/2eFsbCQGFtdz0eE/3g1HqtoZorkD2ZCcb4dX08+x
+4Yk5oTrUA1idblFi4rjLJUC2NthpfRT467A8DlECf4t6fNxom3MPP0LqhTntkIf
CB1nW8URgIM=
=wAhp
-END PGP SIGNATURE-



Re: [PATCH] Minipage

2003-12-06 Thread Georg Baum
Am Samstag, 6. Dezember 2003 15:36 schrieb Juergen Spitzmueller:
> BTW what is the status of lyx2lyx in this regard? Do we need another file
> format change?

We would have needed one when the box inset and the other changes were 
introduced. Now it is too late, because we have already several "flavours" 
of 225, and files do exist in these "flavours". We gain nothing by creating 
a new file format subsequently now, we can as well declare the "latest 225" 
to be the "real 225" and consider tex2lyx and earlier versions of lyx that 
implement a different flavour broken.

It would be nice if this could be handled better in the future.


Georg




Re: [PATCH] Minipage

2003-12-06 Thread Georg Baum
Am Samstag, 6. Dezember 2003 17:48 schrieb Juergen Spitzmueller:
> Georg Baum wrote:
> > Yes please, until tex2lyx is adapted to output the box inset instead of
> > minipage.
>
> Hm, my patch does not make anything worse. tex2lyx produces \lyxformat
> 225 files, while lyx2lyx's minipage->box conversion happens between 223
> and 225. So files with minipages produced with this version of tex2lyx
> will cause problems (as Kornel's file) in any case, unless we bump
> version to 226 and shift the minipage->box conversion to 225->226.

Try it: Current LyX without your patch can read the minipages that tex2lyx 
currently produces (although they cannot be inserted via menu anymore).


Georg




Re: [PATCH] Minipage

2003-12-06 Thread Kornel Benko
-BEGIN PGP SIGNED MESSAGE-

On Samstag, 6. Dezember 2003 22:19, Georg Baum wrote:
> Am Samstag, 6. Dezember 2003 17:48 schrieb Juergen Spitzmueller:
> > Georg Baum wrote:
> > > Yes please, until tex2lyx is adapted to output the box inset instead of
> > > minipage.
> >
> > Hm, my patch does not make anything worse. tex2lyx produces \lyxformat
> > 225 files, while lyx2lyx's minipage->box conversion happens between 223
> > and 225. So files with minipages produced with this version of tex2lyx
> > will cause problems (as Kornel's file) in any case, unless we bump
> > version to 226 and shift the minipage->box conversion to 225->226.
> 
> Try it: Current LyX without your patch can read the minipages that tex2lyx 
> currently produces (although they cannot be inserted via menu anymore).
> 

You can produce them with
M-x minipage-insert


> Georg
> 
Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iQCVAwUBP9JRjLewfbDGmeqhAQGP8wP/X86A9MKGq+4GwUhCvJalyU4edtNGucnC
4dLJEjz6iX3yQxbnLzqKPKmdsH7ckW5T8Xlul3/hR5Mob7aWI7A74glKS94Bg1wy
fhrCX5wZl/D+XhDZ/65RaQuIYIr7RwzbNWSFAE13Pc2aCdUHGM6rnB6mTBkqHZ9r
289PTaLo6pQ=
=CXE9
-END PGP SIGNATURE-