Jose' Matos wrote: > On Wednesday 31 March 2004 17:42, Georg Baum wrote: > > Georg I will apply your changes later or tomorrow. :-)
Please use the following for the equivalent of lyxconvert_230.py (the old version did not put the new flag at the right place): Index: lib/lyx2lyx/lyxconvert_230.py =================================================================== RCS file: /cvs/lyx/lyx-devel/lib/lyx2lyx/lyxconvert_230.py,v retrieving revision 1.1 diff -u -r1.1 lyxconvert_230.py --- lib/lyx2lyx/lyxconvert_230.py 2004/03/29 11:38:36 1.1 +++ lib/lyx2lyx/lyxconvert_230.py 2004/04/01 12:42:51 @@ -21,9 +21,28 @@ import sys from parser_tools import find_token +def convert_float(lines): + i = 0 + while 1: + i = find_token(lines, '\\begin_inset Float', i) + if i == -1: + return + # Seach for a line starting 'wide' + # If, however, we find a line starting '\begin_layout' + # (_always_ present) then break with a warning message + i = i + 1 + while 1: + if (lines[i][:4] == "wide"): + lines.insert(i + 1, 'sideways false') + break + elif (lines[i][:13] == "\\begin_layout"): + sys.stderr.write("Malformed lyx file\n") + break + i = i + 1 + i = i + 1 -def convert(header, body): - pass +def convert(header, body): + convert_float(body) if __name__ == "__main__": pass > Simple, you work with the lyx_1_4.py file during the 1.4 dev. cycle, > we will work on the lyx_1_5.py file during the 1.5 cycle and so on. It > is not so difficult after all. ;-) I hope I can remember it this time ;-) > Ok, I have implemented also the new API where we pass the opt struct, > I will pass there the error chanel, that is or the standard error or a > file that we choose, to be later seen in LyX. Great! The "feature" that requires this (not allowing filenames without extension in insetgraphics anymore) ist still in my queue, but not at the first position... Georg