]> git.lyx.org Git - lyx.git/blobdiff - lib/lyx2lyx/lyx_2_1.py
ePub: share a bit of code for parsing arguments.
[lyx.git] / lib / lyx2lyx / lyx_2_1.py
index 8838a64042918cc1d961d1b61736f659e3bb9680..d370112aa5d71c3446a7d461a2fb48639a4993b1 100644 (file)
@@ -181,7 +181,7 @@ def convert_TeX_brace_to_Argument(document, line, n, nmax, inset, environment, o
             else:
               beginBrace = find_token(document.body, "{", endBrace, end_layout)
             # assure that the ERTs are consecutive (11 or 12 depending if there is a space between the ERTs or not)
-            if beginBrance != -1 and (beginBrace == endBrace + 11 or beginBrace == endBrace + 12):
+            if beginBrace != -1 and (beginBrace == endBrace + 11 or beginBrace == endBrace + 12):
               end = find_token(document.body, "\\end_inset", beginBrace)
               document.body[lineERT : end + 1] = ["\\end_layout", "", "\\end_inset"]
               if loop == 1:
@@ -353,7 +353,7 @@ def revert_undertilde(document):
 
 
 def revert_negative_space(document):
-    "Revert InsetSpace negmedspace and negthickspace into its TeX-code counterpart"
+    "Revert InsetSpace negmedspace and negthickspace into their TeX-code counterparts"
     i = 0
     j = 0
     reverted = False
@@ -366,7 +366,7 @@ def revert_negative_space(document):
           if reverted == True:
             i = find_token(document.header, "\\use_amsmath 2", 0)
             if i == -1:
-              add_to_preamble(document, ["\\@ifundefined{negthickspace}{\\usepackage{amsmath}}"])
+              add_to_preamble(document, ["\\@ifundefined{negthickspace}{\\usepackage{amsmath}}{}"])
           return
       if i == -1:
         return