]> git.lyx.org Git - lyx.git/blobdiff - lib/lyx2lyx/lyx_1_1_6_0.py
Don't use widest label for numerical citations.
[lyx.git] / lib / lyx2lyx / lyx_1_1_6_0.py
index 77443c2364f0dd6ce84836453d9816f269d918bb..dd6112423f7bf19afcb792867d6e0c1bf3411231 100644 (file)
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
-""" Convert files to the file format generated by lyx 1.1.6"""
+""" Convert files to the file format generated by lyx 1.1.6, until fix2"""
 
 import re
-import string
 from parser_tools import find_re, find_tokens, find_token, check_token
 
 lyxtable_re = re.compile(r".*\\LyXTable$")
@@ -43,7 +42,7 @@ def update_tabular(document):
         i = i + 1
         lines[i] = "\\begin_inset  Tabular"
         i = i + 1
-        head = string.split(lines[i])
+        head = lines[i].split()
         rows = int(head[0])
         columns = int(head[1])
 
@@ -56,8 +55,8 @@ def update_tabular(document):
         row_info = []
         cont_row = []
         for j in range(rows):
-            row_info.append(string.split(lines[i]))
-            if string.split(lines[i])[2] == '1':
+            row_info.append(lines[i].split())
+            if lines[i].split()[2] == '1':
                 cont_row.append(j)
             del lines[i]
 
@@ -116,7 +115,7 @@ def update_tabular(document):
                     del lines[i]
                     end = end -1
 
-                if string.find(lines[i],'\\newline') != -1:
+                if lines[i].find('\\newline') != -1:
                     del lines[i]
                 l = l + 1
 
@@ -266,8 +265,8 @@ def set_paragraph_properties(lines, prop_dict):
 
 
 def update_language(document):
-    " Update document language, if language is default convert it to
-    english."
+    """ Update document language, if language is default convert it to
+    english."""
     header = document.header
     i = find_token(header, "\\language", 0)
     if i == -1:
@@ -275,7 +274,7 @@ def update_language(document):
         header.append('\\language english')
         return
     # This is the lyx behaviour: defaults to english
-    if string.split(header[i])[1] == 'default':
+    if header[i].split()[1] == 'default':
         header[i] = '\\language english'
     return