lines.insert(i, '<Features rotate="%s" islongtable="%s" endhead="%s" endfirsthead="%s" endfoot="%s" endlastfoot="%s">' % (head[2],head[3],head[4],head[5],head[6],head[7]))
i = i +1
-
+
row_info = []
cont_row = []
for j in range(rows):
del lines[i]
if not lines[i]:
del lines[i]
-
+
# Read cells
l = 0
cell_content = []
# the end variable refers to cell end, not to file end.
end = find_tokens(lines, ['\\layout','\\the_end','\\end_deeper','\\end_float'], i)
else:
- end = find_token(lines, '\\newline ', i)
+ end = find_token(lines, '\\newline', i)
if end == -1:
sys.stderr.write("Malformed lyx file\n")
del lines[i]
end = end -1
- if lines[i] == '\\newline ':
+ if string.find(lines[i],'\\newline') != -1:
del lines[i]
l = l + 1
else:
paragraph = cell_content[j][k]
tmp = tmp + set_paragraph_properties(paragraph, prop_dict)
-
+
tmp.append('\\end_inset ')
tmp.append('</Cell>')
tmp.append('</Column>')
if not lines[start:] and not lines[end:]:
return []
-
+
result = lines[:start] + aux[:] + lines[end:]
if insert and result[0] != '':
return [''] + result[:]
header.append('\\language english')
return
# This is the lyx behaviour: defaults to english
- header[i] = '\\language english'
+ if string.split(header[i])[1] == 'default':
+ header[i] = '\\language english'
return
def convert(header,body):