mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
Minor cleanup for IEEETran reversion.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36081 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ac0ee09a23
commit
dd0a135588
@ -1507,7 +1507,7 @@ def revert_IEEEtran(document):
|
|||||||
i = find_token(document.body, '\\begin_layout ' + layout, i)
|
i = find_token(document.body, '\\begin_layout ' + layout, i)
|
||||||
if i == -1:
|
if i == -1:
|
||||||
break
|
break
|
||||||
j = find_end_of(document.body, i, '\\begin_layout', '\\end_layout')
|
j = find_end_of_layout(document.body, i)
|
||||||
if j == -1:
|
if j == -1:
|
||||||
document.warning("Malformed LyX document: Can't find end of " + layout + " layout.")
|
document.warning("Malformed LyX document: Can't find end of " + layout + " layout.")
|
||||||
i += 1
|
i += 1
|
||||||
@ -1515,10 +1515,11 @@ def revert_IEEEtran(document):
|
|||||||
if layout in obsoletedby:
|
if layout in obsoletedby:
|
||||||
document.body[i] = "\\begin_layout " + obsoletedby[layout]
|
document.body[i] = "\\begin_layout " + obsoletedby[layout]
|
||||||
i = j
|
i = j
|
||||||
else:
|
continue
|
||||||
content = lyx2latex(document, document.body[i:j + 1])
|
content = lyx2latex(document, document.body[i:j + 1])
|
||||||
add_to_preamble(document, [latexcmd[layout] + "{" + content + "}"])
|
add_to_preamble(document, [latexcmd[layout] + "{" + content + "}"])
|
||||||
del document.body[i:j + 1]
|
del document.body[i:j + 1]
|
||||||
|
# no need to reset i
|
||||||
|
|
||||||
|
|
||||||
def convert_prettyref(document):
|
def convert_prettyref(document):
|
||||||
|
Loading…
Reference in New Issue
Block a user