Juergen Spitzmueller wrote:

> * format incremented to 240.
> * new bufferparam:
> \output_changes {true|false}
> (should the change tracking marks be visible in the output or not?)
> * lyx2lyx should just delete the param in 239.

Here is the patch. Untested, but should work ;-)


Georg
? output_changes_lyx2lyx.diff
Index: lib/lyx2lyx/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/ChangeLog,v
retrieving revision 1.57
diff -u -p -r1.57 ChangeLog
--- lib/lyx2lyx/ChangeLog	6 Jan 2005 18:32:44 -0000	1.57
+++ lib/lyx2lyx/ChangeLog	24 Jan 2005 15:13:49 -0000
@@ -1,3 +1,8 @@
+2005-01-24  Georg Baum  <[EMAIL PROTECTED]>
+
+	* LyX.py: format up to 240.
+	* lyx_1_4.py (convert_output_changes, revert_output_changes): new
+
 2005-01-06  José Matos  <[EMAIL PROTECTED]>
 
 	* lyx_1_4.py (normalize_paragraph_params): add start_of_appendix
Index: lib/lyx2lyx/LyX.py
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/LyX.py,v
retrieving revision 1.9
diff -u -p -r1.9 LyX.py
--- lib/lyx2lyx/LyX.py	6 Jan 2005 16:52:07 -0000	1.9
+++ lib/lyx2lyx/LyX.py	24 Jan 2005 15:13:49 -0000
@@ -46,7 +46,7 @@ format_relation = [("0_10",  [210], ["0.
                    ("1_1_6fix3", [218], ["1.1.6fix3","1.1.6fix4","1.1"]),
                    ("1_2", [220], ["1.2.0","1.2.1","1.2.3","1.2.4","1.2"]),
                    ("1_3", [221], ["1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3"]),
-                   ("1_4", range(223,240), ["1.4.0cvs","1.4"])]
+                   ("1_4", range(223,241), ["1.4.0cvs","1.4"])]
 
 
 def formats_list():
Index: lib/lyx2lyx/lyx_1_4.py
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/lyx_1_4.py,v
retrieving revision 1.22
diff -u -p -r1.22 lyx_1_4.py
--- lib/lyx2lyx/lyx_1_4.py	6 Jan 2005 18:32:44 -0000	1.22
+++ lib/lyx2lyx/lyx_1_4.py	24 Jan 2005 15:13:50 -0000
@@ -1534,6 +1534,24 @@ def normalize_paragraph_params(file):
 
 
 ##
+# Add/remove output_changes parameter
+#
+def convert_output_changes (file):
+    i = find_token(file.header, '\\tracking_changes', 0)
+    if i == -1:
+        file.warning("Malformed lyx file: Missing '\\tracking_changes'.")
+        return
+    file.header.insert(i+1, '\\output_changes true')
+
+
+def revert_output_changes (file):
+    i = find_token(file.header, '\\output_changes', 0)
+    if i == -1:
+        return
+    del file.header[i]
+
+
+##
 # Convertion hub
 #
 
@@ -1556,9 +1574,11 @@ convert = [[223, [insert_tracking_change
                   normalize_papersize, strip_end_space]],
            [237, [use_x_boolean]],
            [238, [update_latexaccents]],
-           [239, [normalize_paragraph_params]]]
+           [239, [normalize_paragraph_params]],
+           [240, [convert_output_changes]]]
 
-revert =  [[238, []],
+revert =  [[239, [revert_output_changes]],
+           [238, []],
            [237, []],
            [236, [use_x_binary]],
            [235, [denormalize_papersize, remove_begin_body,remove_begin_header,

Reply via email to