]> git.lyx.org Git - lyx.git/commitdiff
lyx_2_0.py:
authorUwe Stöhr <uwestoehr@web.de>
Tue, 31 Aug 2010 23:31:32 +0000 (23:31 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Tue, 31 Aug 2010 23:31:32 +0000 (23:31 +0000)
- add missing conversion routine for latest fileformat change
- fix reversion of latest fileformat change

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35249 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/lyx_2_0.py

index e9a3b8ecbfa4e8fe825b68a17b254c317b74fbae..ff60e75bb43ffad5d6ef531f13e928ea02a0ee37 100644 (file)
@@ -2057,13 +2057,23 @@ def revert_mathrsfs(document):
       i += 1
 
 
+def convert_mathdots(document):
+    " Load mathdots if used in the document "
+    while True:
+      i = find_token(document.header, "\\use_esint" , 0)
+      if i != -1:
+        document.header.insert(i + 1, "\\use_mathdots 1")
+      break
+
+
 def revert_mathdots(document):
     " Load mathdots if used in the document "
     while True:
       i = find_token(document.header, "\\use_mathdots" , 0)
       if i != -1:
+        # use \@ifundefined to catch also the "auto" case
         add_to_preamble(document, ["% this command was inserted by lyx2lyx"])
-        add_to_preamble(document, ["\\usepackage{mathdots}"])
+        add_to_preamble(document, ["\\@ifundefined{iddots}{\\usepackage{mathdots}}"])
         del document.header[i]
       break
 
@@ -2126,7 +2136,7 @@ convert = [[346, []],
            [396, []],
            [397, [remove_Nameref]],
            [398, []],
-           [399, []]
+           [399, [convert_mathdots]]
           ]
 
 revert =  [[398, [revert_mathdots]],