use_table = {"0": "none", "1": "parbox"}
table_meta_re = re.compile(r'<LyXTabular version="?1"? rows="?(\d*)"? columns="?(\d*)"?>')
-def update_tabular(lines, opt):
+def update_tabular(file):
+ lines = file.body
i=0
while 1:
i = find_token(lines, '\\begin_inset Tabular', i)
j = find_token(lines, '</LyXTabular>', i) + 1
if j == 0:
- opt.warning( "Error: Bad lyx format i=%d j=%d" % (i,j))
+ file.warning( "Error: Bad lyx format i=%d j=%d" % (i,j))
break
new_table = table_update(lines[i:j])
return lines[:2] + col_info + lines[2:]
-def convert(header, body, opt):
- update_tabular(body, opt)
- opt.format = 218
-
-
-def revert(header, body, opt):
- opt.error("The convertion to an older format (%s) is not implemented." % opt.format)
+convert = [[218, [update_tabular]]]
+revert = []
if __name__ == "__main__":