]> git.lyx.org Git - lyx.git/blobdiff - lib/lyx2lyx/lyx_2_0.py
Fix python release notes
[lyx.git] / lib / lyx2lyx / lyx_2_0.py
index 3e6740db1dedb9203a8cdeab1aa223866583f579..1f1015444043c367e0d570d30f7c726b030cab2b 100644 (file)
@@ -557,7 +557,6 @@ def revert_nomencl_cwidth(document):
       j = find_end_of_inset(document.body, i)
       l = find_token(document.body, "width", i, j)
       if l == -1:
-        document.warning("Can't find width option for nomencl_print!")
         i = j
         continue
       width = get_quoted_value(document.body, "width", i, j)
@@ -1579,10 +1578,13 @@ def convert_use_makebox(document):
 
 def revert_IEEEtran(document):
   " Convert IEEEtran layouts and styles to TeX code "
+
   if document.textclass != "IEEEtran":
     return
+
   revert_flex_inset(document.body, "IEEE membership", "\\IEEEmembership")
   revert_flex_inset(document.body, "Lowercase", "\\MakeLowercase")
+
   layouts = ("Special Paper Notice", "After Title Text", "Publication ID",
              "Page headings", "Biography without photo")
   latexcmd = {"Special Paper Notice": "\\IEEEspecialpapernotice",
@@ -1590,6 +1592,7 @@ def revert_IEEEtran(document):
               "Publication ID":       "\\IEEEpubid"}
   obsoletedby = {"Page headings":            "MarkBoth",
                  "Biography without photo":  "BiographyNoPhoto"}
+
   for layout in layouts:
     i = 0
     while True:
@@ -1601,7 +1604,7 @@ def revert_IEEEtran(document):
           document.warning("Malformed LyX document: Can't find end of " + layout + " layout.")
           i += 1
           continue
-        if layout in obsoletedby:
+        if layout in list(obsoletedby.keys()):
           document.body[i] = "\\begin_layout " + obsoletedby[layout]
           i = j
           continue