]> git.lyx.org Git - lyx.git/commitdiff
File format up to 238.
authorJosé Matox <jamatos@lyx.org>
Fri, 3 Dec 2004 18:39:51 +0000 (18:39 +0000)
committerJosé Matox <jamatos@lyx.org>
Fri, 3 Dec 2004 18:39:51 +0000 (18:39 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9337 a592a061-630c-0410-9148-cb99ea01b6c8

development/FORMAT
lib/lyx2lyx/ChangeLog
lib/lyx2lyx/LyX.py
lib/lyx2lyx/lyx_0_12.py
lib/lyx2lyx/lyx_1_4.py
src/ChangeLog
src/buffer.C

index e6667e05335706dfcaf5f9d16f4571bb1a0429a9..b62e5278e84c7ce34ecf99c367b2a558737bb4d8 100644 (file)
@@ -1,6 +1,23 @@
 LyX file-format changes
 -----------------------
 
+2004-12-03  José Matos  <jamatos@lyx.org>
+
+       * format up to 238.
+       * The compatibility code to read old latex accents from 0.12.x in
+       InsetLatexAccent::checkContents has been removed.
+       The following translations are done:
+               "\i \x"   -> "\i \x{}"
+               "\i \xy"  -> "\i \x{y}"
+               "\i \x y" -> "\i \x{y}"
+               "\i \x\i" -> "\i \x{\i}"
+               "\i \x\j" -> "\i \x{\j}"
+       x is a latex accent command, y the base character. \, i and j are
+       literal.
+       lyx did these changes already from 0.12.x -> 215, but not lyx2lyx,
+       so formats 215 - 237 can have both versions.
+
+
 2004-10-10  José Matos  <jamatos@lyx.org>
 
        * format up to 237.
index 224272356721af9375f45e4b8d1510a985f3535d..1ea2300f4b3c2c46417b6135d731327904828601 100644 (file)
@@ -1,3 +1,10 @@
+2004-12-03  José Matos  <jamatos@lyx.org>
+
+       * LyX.py: format up to 238.
+       * lyx_1_4.py:
+       * lyx_0_12.py (update_latexaccents): consider the cases where the
+       inset is updated.
+
 2004-12-03  José Matos  <jamatos@lyx.org>
 
        * lyx_1_2.py (update_longtable): Update longtables to table format 3.
index ec6e1297879023a1cc55411a30f35ff9f968ab27..4f7da0333298e7a469b84899dd9733c236c055df 100644 (file)
@@ -44,7 +44,7 @@ format_relation = [("0_10",  [210], ["0.10.7","0.10"]),
                    ("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,238), ["1.4.0cvs","1.4"])]
+                   ("1_4", range(223,239), ["1.4.0cvs","1.4"])]
 
 
 def formats_list():
index b8bb35d2de708b0feee14d1cb4170ea4f26bb381..414b0c93032d2ba077486c54d36f8ac0571bbd56 100644 (file)
@@ -236,7 +236,8 @@ def header_update(lines, file):
         i = i + 1
 
 
-def update_latexaccents(body):
+def update_latexaccents(file):
+    body = file.body
     i = 1
     while 1:
         i = find_token(body, '\\i ', i)
@@ -245,6 +246,10 @@ def update_latexaccents(body):
 
         contents = string.strip(body[i][2:])
 
+        if string.find(contents, '{') != -1 and string.find(contents, '}') != -1:
+            i = i + 1
+            continue
+
         if len(contents) == 2:
             contents = contents + '{}'
         elif len(contents) == 3:
@@ -274,7 +279,7 @@ def convert(file):
     update_vfill(file.body)
     remove_empty_insets(file.body)
     remove_formula_latex(file.body)
-    update_latexaccents(file.body)
+    update_latexaccents(file)
     file.format = 215
 
 
index 6cdc0391b4cea92d8cf14f8f7a75d724a270e49c..06232610d4dc6e5fa3f4b42fa080f01193ae5a3e 100644 (file)
@@ -26,6 +26,8 @@ from parser_tools import find_token, find_end_of_inset, get_next_paragraph, \
 from sys import stdin
 from string import replace, split, find, strip, join
 
+from lyx_0_12 import update_latexaccents
+
 ##
 # Remove \color default
 #
@@ -1526,7 +1528,8 @@ def convert(file):
               235 : [convert_paperpackage],
               236 : [convert_bullets, add_begin_header, add_begin_body,
                      normalize_papersize, strip_end_space],
-              237 : [use_x_boolean]}
+              237 : [use_x_boolean],
+              238 : [update_latexaccents]}
 
     chain = table.keys()
     chain.sort()
@@ -1542,7 +1545,8 @@ def convert(file):
 
 
 def revert(file):
-    table = { 236: [use_x_binary],
+    table = { 237: [],
+              236: [use_x_binary],
               235: [denormalize_papersize, remove_begin_body,remove_begin_header,
                     revert_bullets],
               234: [revert_paperpackage],
index e5b901bb952597d82a3af6f439cf65b66d72c12b..199c28c8668f01c378648f5142ad2e21e029e326 100644 (file)
@@ -1,3 +1,7 @@
+2004-12-03  José Matos <jamatos@lyx.org>
+
+       * buffer.C: format up to 238.
+
 2004-12-03  José Matos  <jamatos@lyx.org>
 
        * tabular.[Ch]: remove setHeaderFooterRows as this code is never called.
index 21740256db3cde6d9a3bd5b764cf544a5b536a36..37ec8955e8a5879cb62cbd11f1dcf8c250acdfc5 100644 (file)
@@ -136,7 +136,7 @@ extern BufferList bufferlist;
 
 namespace {
 
-const int LYX_FORMAT = 237;
+const int LYX_FORMAT = 238;
 
 } // namespace anon