On Tue, Oct 02, 2007 at 10:30:47PM -0400, Richard Heck wrote: > Dov Feldstern wrote: > >I agree very much with what JMarc has been saying about this issue: > >although I like very much the idea of character styles / logical > >markup, I don't think that insets are the right paradigm for > >implementing this. > But there's a point JMarc made along the way which isn't accounted here, > and it needs to be, namely: There are two questions here: how charstyles > (say) are implemented in the code, and how they appear to the user. The > issues that have been raised have to do with how charstyles appear to > the user. Whether they exist as insets in LyX isn't critical from that > point of view. > > There's also the question how all of this gets written to a LyX file. > Especially once we're doing XML, it'll be essential that everything be > properly nested (unless each character is supposed to be written with > all of its associated formatting information, which is insane). Insets > are a natural correlate to that, because they nest. This does NOT mean > that they have to appear to the user as insets, only that the underlying > data structure nests properly. > > Let me also add this point. One of my complaints about fonts and the > like as they currently exist is that it can be very hard to tell where > they begin and where they end. (Try emphasizing some text and then > italicizing something in the middle of it.) Even if the boundaries of > the inset are not ordinarily shown, it'd be nice to have them be > showABLE, so that you can answer this kind of question without having to > View>Source. > > Richard
This is precisely my point also. Dov's argument is clever, and has merit, but it misses this core point: nesting behaviour. Like in HTML / XML, where you could, but should not, write <i> aaaa <b> bbb </i> ccc </b>, the same should apply to logical text styles. Insets enforce that in a natural way. Character attributes do not, and a major part of the hellish complexity of handling them, and their correct LaTeX output, is due to this. (As a historical note, I started out developing branches based on character attributes. Angus et al. forced me to use insets instead. Good that he did. Of course branches are a different thing, but it tought me the advantages of encapsulation and imposing structure -- and allowing user configurability down the line! -- that insets bring.) - Martin