diff --git a/lib/ChangeLog b/lib/ChangeLog index 7756f55839..c1752d0f05 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,8 @@ +2003-03-14 Dekel Tsur + + * lyx2lyx/lyxconvert_218.py (remove_pextra): Fix conversion of + minipages that contains tabulars. + 2003-03-14 Jean-Marc Lasgouttes * templates/revtex4.lyx: diff --git a/lib/lyx2lyx/lyxconvert_218.py b/lib/lyx2lyx/lyxconvert_218.py index 3f0c45e8bf..b99292bc2e 100644 --- a/lib/lyx2lyx/lyxconvert_218.py +++ b/lib/lyx2lyx/lyxconvert_218.py @@ -164,11 +164,8 @@ def remove_pextra(lines): else: start = ["\\layout Standard"] + start - j = find_token_backwards(lines,"\\layout", i-1) - j0 = j - - j = find_tokens(lines, ["\\layout", "\\end_float"], i+1) - # j can be -1 + j0 = find_token_backwards(lines,"\\layout", i-1) + j = get_next_paragraph(lines, i) count = 0 while 1: diff --git a/lib/lyx2lyx/parser_tools.py b/lib/lyx2lyx/parser_tools.py index adf711b99d..312fa4fa35 100644 --- a/lib/lyx2lyx/parser_tools.py +++ b/lib/lyx2lyx/parser_tools.py @@ -105,9 +105,8 @@ def get_paragraph(lines, i): # Finds the paragraph after the paragraph that contains line i. def get_next_paragraph(lines, i): while i != -1: - i = find_tokens(lines, ["\\begin_inset", "\\layout"], i) - if i == -1: return -1 - if check_token(lines[i], "\\layout"): + i = find_tokens(lines, ["\\begin_inset", "\\layout", "\\end_float", "\\the_end"], i) + if not check_token(lines[i], "\\begin_inset"): return i i = find_end_of_inset(lines, i)