From: José Matox Date: Tue, 21 Oct 2003 17:21:45 +0000 (+0000) Subject: convert minipage to insetbox. (223 -> 225) X-Git-Tag: 1.6.10~15922 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=272af48ec969623af01986a2f7a1fdcf1d1fecc9;p=features.git convert minipage to insetbox. (223 -> 225) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7946 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/lib/ChangeLog b/lib/ChangeLog index f4b5cb3ba3..e128f1dacf 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2003-10-21 José Matos + + * lyxconvert_223.py (convert_minipage): convert minipage to insetbox. + 2003-10-10 Angus Leeming * images/math/cases.xpm: diff --git a/lib/lyx2lyx/lyxconvert_223.py b/lib/lyx2lyx/lyxconvert_223.py index 8a875b5076..9b5e69d079 100644 --- a/lib/lyx2lyx/lyxconvert_223.py +++ b/lib/lyx2lyx/lyxconvert_223.py @@ -118,9 +118,34 @@ def convert_comment(lines): i = i + 1 +def convert_minipage(lines): + 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 " + pos[int(lines[i][9])] + i = i + 1 + + # do the same for the inner_position + if lines[i][:14] == "inner_position": + lines[i] = "inner_pos " + inner_pos[int(lines[i][15])] + i = i + 1 + def convert(header, body): convert_external(body) convert_comment(body) + convert_minipage(body) if __name__ == "__main__": pass