On Monday, 19 February 2018 15.40.42 WET Jürgen Spitzmüller wrote: > xcellent. Here is my analysis. > > Since this is a very old document, it has "\layout Standard" in insets. > Now as of format 315 (for LyX 1.6), we switched to "\begin_layout > PlainLayout" and shortly afterwards "\begin_layout Plain Layout" inside > insets. But we do not actually convert "Standard" to "Plain Layout" > (probably since it is hard to predict where to do that and since we > rely on LyX doing that anyway), so the insets keep having > "\begin_layout Standard".
I agree with your assessment of the problem. :-) Since the list of insets where this is required should be a fixed number, no? > Now the convert_separator routine (format 475) checks whether we are > inside a text inset precisely by looking for "Plain Layout". This of > course fails here, hence the separator is inserted (lyx_2_2.py:186ff.) > > I am not sure if there is an easy fix for this. The "real" fix would be > to actually change Standard to PlainLayout in 315, but I suppose there > were reasons for not doing that. I am not sure if the check in > convert_separator can be adapted to cover these old cases. The solution that you got in the next message in thread is a neat one. :-) My only doubt is if there could be other places where this can occur. If I had to take a guess I would say no but I am not sure. One doubt that I have about this is if there is any difference here between the file converted by lyx2lyx and the file re-saved by lyx. Is there any relevant difference? (I'm leaving in really soon and I do not have to test it right now) > Jürgen Regards, -- José Abílio