On Thu, 16 Nov 2006, Georg Baum wrote: > > How about inserting some special inset (or comment) in those paragraphs > > that don't have an equivalent in the new class? (The inset/comment would > > not produce any output). > > > > That comment/inset would then server as a reminder/warning that the > > paragraph layout wasn't properly converted. > > And what should I do with it as a user? Am I required to delete 100 such > insets after I changed documentclass if I am OK with the change?
Good point. A function for erasing all once would then be useful, or alternatively insets for a specific previous paragraph layout. Then you would do it one type of previous paragraph layout at time, which will make you more confident that you've checked all the failed conversions. Since there are only a few types of paragraph layouts, of which only a subset will fail to convert, you only have to do it a few times. 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. > > 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? 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. > 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. > 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. ?? /Christian -- Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr