> Insets are an appropriate means for structured editing but they are not > suitable for writing consecutive text. If I had had to insert an inset > for every emphasized term, for every capitalized product name, for every > keyword in typewriter font, and for every figure reference in sans serif > in my PhD, I would have jumped out of the window!!!
I guess one should keep in mind that insets are 99% programming paradigms, and only about 1% user-visible things. User has no concept of an inset. It all boils down to making the interface to creating such character-style insets an easy one. In such a case we have two possible behaviours: 1. MicroPro WordStar (last time I used it on a CP/M machine in mid-80's) approach: all formatting is an invisible character, so both "bold on" and "bold off" is an invisible character, and you can both delete it and you have to "jump over" it with arrow cursors if say you're moving cursor in the text with arrows (^S/^D for left/right anyone? :). Apparently, thousands of users found that acceptable and this is directly modeled by "right arrow only enters the inset", but it makes some problems with backspace -- essentially a backspace at the "bold end" character did expand the "bold" all the way to end of paragraph or somesuch, whereas in our case it would delete the whole inset. Not a nice thing. It may not be such a great idea nowadays methinks. 2. Your average editor approach - "insets" or whatever implements character styles are invisible. Backspace just outside of the right end of a "bold" inset should automatically enter the inset and then perform the action of backspace. I find that "2" is widely accepted nowadays. Implementation-wise I imagine that character-style insets are OK as long as certain things done just outside of both ends of the inset (say backspace on the right, delete on the left) first enter the inset and then feed-forward the action to the inset itself. There will also be some constraints as to how far a character style can go. I imagine we will artificially need to terminate all character styling at the end of the paragraph, otherwise it'll be an uncontainable mess. This may actually make sense for logical formatting - typically, you're making a word/sentence bolded, not the whole document; if it's the whole document you should adjust the default paragraph style properties (in LyX's case it would be more like document properties). I haven't read the whole thread yet, so if my points have already been raised, feel free to ignore me :) Cheers, Kuba