[EMAIL PROTECTED] wrote: > For me there is a point to being informed that a layout didn't convert > properly, as I then probably want to change it into some other kind of > layout.
Yes, that is useful information, but it has not much to do with a special inset. A special inset is only one way to implement it. Another way is the error list that we already have. Just try it. >> > As an extension, there could be a method that when converting to a new >> > document class looks in default paragraphs for such an inset. If the >> > inset exists, the paragraph is converted to the original layout. >> >> That would be a bad hack and lead to ugly code and almost certainly to >> bugs. > > 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. 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. > As I see it, a document should not have to change as an end result if it > is first converted to another document class and then converted back to > the original document class. > > In other words, the layout of all paragraphs is the same as before the > initial conversion. This should work with arbitrary classes, i.e. the > classes shouldn't have to be made to interoperate. I also think it should > work even if the document is saved in between the changes. That may be a desirable goal, but it cannot be implemented with finite effort. This is nothing different than LyX->LaTeX->LyX round trip (or round trip to any other format, e.g. LyX->MS Word->LyX). >> I like Jean-Marc's solution much better. > > I think it should be augmented with some method to find the paragraphs > that failed to convert properly. When I've converted a document I would > like to know which paragraphs failed to convert. We have that already. Just try it. >> 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. Georg