On Wed, Aug 15, 2007 at 12:16:47AM +0300, Dov Feldstern wrote: > Mael Hilléreau wrote: > > >> So inset-type would be a nice higher level, because it will allow me to > >> easily do what I usually want; but we still need to account for > >> exceptions, which inset-type can't do. (Don't say "we can have a special > >> 'ignore spelling' inset": I think it will be hard to correctly implement > >> the latex output method for such an inset. > > It would be more simple than for branches, no? > > You almost convinced me here. However, I just tried this with branches now, > and it turns out that exactly where I expected trouble, there are in fact > bugs with the interaction of the branch inset and BiDi text, *because* the > branch is in an inset. Nothing major, it's a convoluted scenario that I > tried, I don't really think anyone will want to try it with branches. But > nonetheless, I still contend that doing this with an inset is more > complicated and error-prone than doing it with character attributes. > > >> What should happen in terms of latex output in this case is absolutely > >> nothing: it should be as if the inset weren't there; but I think that it > >> would be hard to achieve this "nothing" in the current architecture, > >> because there are too many things which *do* happen when a new inset is > >> started --- just look at the relevant code...) > > Is that true for e.g. notes or comments as well? > > I think I didn't explain myself clearly. What I meant is, I'm thinking of > text which goes like "abc def ghi", and now someone comes and says: "def" is > not a word, and so decides to mark it as ignore-spelling. So he puts an > inset around it, and then we have "abc [def] ghi". But the output of "abc > [def] ghi" should look *exactly* the same as the output of "abc def ghi". I > think that so far we all agree on this. > > The same thing, BTW, should hold for branches. Say that the 'def' is only in > a branch. Well, the output of that branch should look as if the text were > "abc def ghi", without the inset there. Right? > > The problem is, this is not working --- even now with branches, as I just > found out thanks to your question --- in certain cases which involve Bidi > text (and maybe other kinds of transitions). In other words, in these > situations, for "abc def ghi" I get one output, and for "abc [def] ghi" (in > which the branch is activated, of course) I get *different* output. So I'm > not saying that we should now go and implement branches as character > attributes rather than insets (though that may actually not be a bad > idea...;) );
Actually my first attempt at implementing branches was character attribute based. > but if we're doing this again in another situation, I say we > keep it simple this time. > > >> Regarding character-styles, I have two half-objections to using this: (a) > >> I'm not really sure that character styles are where the concept of > >> ignoring the spell-checker belongs. I see character styles as a tool for > >> semantic markup, whereas ignore spelling is not, IMO --- although agree > >> this may be debatable --- semantic, but technical. And mixing concepts is > >> a bad idea, even if today I can't point to a specific reason why. > > Perhaps one could say that ignoring spellcheck shouldn't be confused with a > > font attribute... Character styles are too limited semantically... we should (and we are working on that) have more generic "custom insets" for precisely these kinds of purpose. - Martin