# 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
paragraph = []
if cell_info[m][4] == '1':
l = j
- paragraph.extend(cell_content[j][k])
+ paragraph = paragraph + cell_content[j][k]
while cell_info[m][4] == '1':
m = m + columns
l = l + 1
- paragraph.extend(cell_content[l][k])
+ paragraph = paragraph + cell_content[l][k]
else:
paragraph = cell_content[j][k]
- tmp.extend(set_paragraph_properties(paragraph, prop_dict))
+ tmp = tmp + set_paragraph_properties(paragraph, prop_dict)
tmp.append('\\end_inset ')
tmp.append('</Cell>')
tmp.append('\\end_inset ')
tmp.append('')
tmp.append('')
- tail = lines[i:]
- lines[i:] = []
- lines.extend(tmp)
- lines.extend(tail)
+ lines[i:i] = tmp
i = i + len(tmp)
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):