mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Improve beamer frame conversion: consider explicit EndFrames between two identical frame types
This commit is contained in:
parent
86efb5938d
commit
0f18bc753c
@ -3878,6 +3878,13 @@ def convert_lyxframes(document):
|
||||
old = document.body[fend]
|
||||
if val == frametype:
|
||||
document.body[fend : fend] = ['\\end_deeper', '', '\\begin_layout Separator', '', '\\end_layout']
|
||||
# consider explicit EndFrames between two identical frame types
|
||||
elif val == "EndFrame":
|
||||
nextlayout = find_token(document.body, "\\begin_layout", fend + 1)
|
||||
if nextlayout != -1 and get_value(document.body, "\\begin_layout", nextlayout) == frametype:
|
||||
document.body[fend : fend] = ['\\end_deeper', '', '\\begin_layout Separator', '', '\\end_layout']
|
||||
else:
|
||||
document.body[fend : fend] = ['\\end_deeper']
|
||||
else:
|
||||
document.body[fend : fend] = ['\\end_deeper']
|
||||
document.body[j + 1 : j + 1] = ['', '\\begin_deeper']
|
||||
|
Loading…
Reference in New Issue
Block a user