]> git.lyx.org Git - features.git/commitdiff
fix lyx2lyx paragraph parameter conversion
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Wed, 18 May 2005 14:50:29 +0000 (14:50 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Wed, 18 May 2005 14:50:29 +0000 (14:50 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9951 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/ChangeLog
lib/lyx2lyx/lyx_1_4.py

index 724013af4706fb7292cdadd718cad5122cbe95ca..48525fe8279e66e87607385592a2d238c18e1475 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-18  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
+
+       * lyx_1_4.py (convert_breaks): Don't treat every token that starts
+       with '\\' as paragraph parameter
+
 2005-05-06  José Matos  <jamatos@lyx.org>
 
        * lyx_1_4.py (convert_breaks): put all paragraph parameters into a single line.
index eb0c91edba3915dc868f961b96f480af49003289..da3480161229fc1e342da1a01251d905e06d95ce 100644 (file)
@@ -518,6 +518,10 @@ def revert_end_document(file):
 #
 #\end_layout
 def convert_breaks(file):
+    par_params = ('added_space_bottom', 'added_space_top', 'align',
+                 'labelwidthstring', 'line_bottom', 'line_top', 'noindent',
+                 'pagebreak_bottom', 'pagebreak_top', 'paragraph_spacing',
+                 'start_of_appendix')
     i = 0
     while 1:
         i = find_token(file.body, "\\begin_layout", i)
@@ -526,7 +530,9 @@ def convert_breaks(file):
         i = i + 1
 
         # Merge all paragraph parameters into a single line
-        while file.body[i + 1][:1] == '\\':
+        # We cannot check for '\\' only because paragraphs may start e.g.
+        # with '\\backslash'
+        while file.body[i + 1][:1] == '\\' and split(file.body[i + 1][1:])[0] in par_params:
             file.body[i] = file.body[i + 1] + ' ' + file.body[i]
             del file.body[i+1]