]> git.lyx.org Git - lyx.git/blobdiff - lib/lyx2lyx/lyx_2_0.py
Don't use widest label for numerical citations.
[lyx.git] / lib / lyx2lyx / lyx_2_0.py
index 848621f16c4b830e8c8373d8f67a7fbc6299ffea..2756418f88d09afb0671878977800b6a8f525584 100644 (file)
@@ -1817,9 +1817,16 @@ def convert_mathdots(document):
     " Load mathdots automatically "
     i = find_token(document.header, "\\use_mhchem" , 0)
     if i == -1:
-      i = find_token(document.header, "\\use_esint" , 0)
-    if i != -1:
-      document.header.insert(i + 1, "\\use_mathdots 1")
+        i = find_token(document.header, "\\use_esint" , 0)
+    if i == -1:
+        document.warning("Malformed LyX document: Can't find \\use_mhchem.")
+        return;
+    j = find_token(document.preamble, "\\usepackage{mathdots}", 0)
+    if j == -1:
+        document.header.insert(i + 1, "\\use_mathdots 0")
+    else:
+        document.header.insert(i + 1, "\\use_mathdots 2")
+        del document.preamble[j]
 
 
 def revert_mathdots(document):