Return here unless the doc class is correct.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34783 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-07-06 13:50:23 +00:00
parent 9defda7c32
commit 2909e6450b

View File

@ -350,7 +350,6 @@ def revert_layout_command(document, name, LaTeXname, position):
i = find_token(document.body, '\\begin_layout ' + name, i)
if i == -1:
return
else:
k = -1
# find the next layout
j = i + 1
@ -1848,6 +1847,9 @@ def revert_makebox(document):
def revert_IEEEtran(document):
" Convert IEEEtran layouts and styles to TeX code "
if document.textclass != "IEEEtran":
return
revert_flex_inset(document, "IEEE membership", "\\IEEEmembership", 0)
revert_flex_inset(document, "Lowercase", "\\MakeLowercase", 0)
revert_layout_command(document, "Special Paper Notice", "\\IEEEspecialpapernotice", 0)
@ -1870,7 +1872,6 @@ def revert_IEEEtran(document):
+ '\\end_layout\n\n' \
+ '\\end_inset\n\n\n' \
+ '\\end_layout\n\n'
if document.textclass == "IEEEtran":
# insert a note that title and author must be given in TeX code
document.body.insert(0, note)
# we need to revert title and author to TeX code to set \maketitle correctly
@ -1887,7 +1888,7 @@ def revert_IEEEtran(document):
y = find_token(document.body, '\\begin_layout Abstract', 0)
if y == -1:
document.warning("Malformed LyX document: Can't find abstract of IEEEtran paper.")
else:
return
maketitle = ['\\begin_layout Standard\n', \
'\\begin_inset ERT\n', \
'status collapsed\n', \