Enrico Forestieri wrote: > On Mon, May 12, 2014 at 03:34:10AM -0400, Scott Kostyshak wrote: > >> The tex2lyx tests are failing for me because of the recent format >> change. Can someone update the files? >> >> I tried to do so by running >> ${LYX2LYX} "$1" > temp.lyx && mv temp.lyx "$1" >> on all .lyx files in src/tex2lyx/test >> >> I got the following warnings: >> Warning: #LyX file created by tex2lyx 2.1 >> >> Why is this a warning? As long as lyx2lyx finds \lyxformat why does it >> care who made the file?
Because lyx2lyx tries to read the LyX version from that file (see read_version() in LyX.py), and this fails. lyx2lyx should be teached about tex2lyx, then the warning would vanish. >> In any case, at this point I realized the fix is a little more >> complicated because I need to run tex2lyx on the files so I wanted to >> check in here first to see what the process is for updating the files >> and if someone has automated it. It is automated. Please read section 3.2.2 of lib/doc/Development.lyx. Kornel is right, you need to look at the diffs manually in order to judge whether the updated references are OK, but the process of producing them and copying them where git expects them is automated (and needs to be automated - nobody would copy over all these files by hand). > I have no idea. However, after running tex2lyx there should be no > difference (apart from the first two lines of the generated LyX document), > except if the .tex file had two same environments one after the other, > without anything in between. In this case, the only difference should be > that a plain separator inset is inserted instead of the old layout > separator. The procedure of updating a file format is documented in section 2.3 of lib/doc/Development.lyx. Your update was perfect (including tex2lyx support - this is often not done), the only missing bit was the update of the test references. I verified that the new code is correct and did the update. Georg