On Thu, 16 Nov 2006, Georg Baum wrote: > > I fail to see why you call it a hack... Nor why the code must necessarily > > be ugly, but then I'm not familiar with the code in LyX. However, as you > > don't seem to like this approach, do you have a better idea? > > We had exactly what you propose for errors in 1.3. That was replaced > with something else because you had to treat the error insets specially > at many places in the code. Of course that was forgotten sometimes -> > bugs.
That explains it. I haven't used LyX to any extent after Lyx 1.3.5 or so. This new mechanism is unfamiliar to me. > I don't have a better idea other than Jean-Marc suggested. I only know > that the inset solution has problems and prefer to not have this > functionality instead of an implementation with insets. Ok, I understand. The thing I liked with an inset was that it would persist when the document is saved, while I assume that an error list will not. > > like to know which paragraphs failed to convert. > > We have that already. Just try it. Ok, I have just tried it (with LyX 1.4.1). Shouldn't you see on screen *where* the layout had to be changed? In my case the cursor isn't moved to the location of the problem when I select a different error. I did notice though that 'Undo' works, so things have certainly improved! > >> What also might be doable is the "inverse" of obsoletedby: If I have a > >> special document class with special layouts (e.g. for problem sheets), I > >> could declare that layout "subtask" of this class should be mapped to > >> "enumerate" if I convert to a standard class. The advantage of that would > >> be that the standard classes do not need to know all my special layouts. > > > > I'm afraid I don't know what obsoletedby does, so I don't understand its > > inverse either. ?? > > The lines > > Style List > Obsoletedby Labeling > End > > in a .layout file tell LyX to replace the old style List with the new style > Labeling. That means that files that contain List styles will contain > Labeling styles instead after saving. Ok. So the .layout contains transformation instructions for the paragraph styles. I'm a bit sceptical to this approach for the general case though. You would have to define a lot of transformations to cover all cases. I'm primarily interesting in being able to test how the document will appear using a new class for a few days, and be able to revert without unneccessarily loosing information about paragraph styles. I don't expect this to be perfect as it's a tough problem, but it could certainly be better than it is today. Maybe Jean-Marcs suggestion does enough here, since paragraphs styles that don't exist in the new class will retain the information. It really is a pity I haven't been able to use LyX for reqular writing in such a long time :-( regards /Christian -- Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
