]> git.lyx.org Git - features.git/commitdiff
Fix bug 1816.
authorJosé Matox <jamatos@lyx.org>
Tue, 15 Feb 2005 12:04:26 +0000 (12:04 +0000)
committerJosé Matox <jamatos@lyx.org>
Tue, 15 Feb 2005 12:04:26 +0000 (12:04 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9633 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/ChangeLog
lib/lyx2lyx/lyx_1_2.py

index 17fb51b0a4622193ef87446a540d51a50310ac73..1dbb09b576ebfda976c72a6b51bfec7175c1bdc2 100644 (file)
@@ -1,3 +1,7 @@
+2005-02-15  José Matos  <jamatos@lyx.org>
+
+       * lyx_1_2.py (remove_pextra): fix bug 1816.
+
 2005-02-06  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
 
        * lyx_1_4.py (convert_ertbackslash): convert '\n', too
index d42540f1bf752c9731d0b985eb2023e1d13f9f85..5e39dd5f8c298dcec306c6f4710031f086fc0082 100644 (file)
@@ -136,6 +136,7 @@ def remove_oldfloat(file):
 
 pextra_type2_rexp = re.compile(r".*\\pextra_type\s+[12]")
 pextra_type2_rexp2 = re.compile(r".*(\\layout|\\pextra_type\s+2)")
+pextra_widthp = re.compile(r"\\pextra_widthp")
 
 def remove_pextra(file):
     lines = file.body
@@ -146,6 +147,12 @@ def remove_pextra(file):
        if i == -1:
            break
 
+        # Sometimes the \pextra_widthp argument comes in it own
+        # line. If that happens insert it back in this line.
+        if pextra_widthp.search(lines[i+1]):
+            lines[i] = lines[i] + ' ' + lines[i+1]
+            del lines[i+1]
+
        mo = pextra_rexp.search(lines[i])
         width = get_width(mo)