On Wed, Oct 10, 2007 at 12:58:15AM +0200, Dov Feldstern wrote: > > > Martin Vermeer wrote: > >On Sun, Oct 07, 2007 at 10:05:00AM +0300, Martin Vermeer wrote: > >>On Sun, Oct 07, 2007 at 02:26:48AM +0200, Dov Feldstern wrote: > >>> Hi! > > > >... > > > >>> AFAIU, charstyle insets "work" (i.e., determine the font attributes as > >>> they would appear in the latex output), in the following manner: when > >>> such an inset is reached, and say it's a "noun" inset, then the command > >>> for starting the "noun" command is output, followed by the text of the > >>> inset, followed by the command for closing "noun". > >>Yes, \noun{ and } respectively.
... > >2) This would be very easy to do in an inset, as getDrawingFont > >is your friend: just make it test for italics in the surrounding > >font and respond appropriately ;-) The current Emph inset does > >not do this, which is a bug. > > Or, alternatively, not to use getDrawFont at all; and instead, to set > the font attributes to reflect their "real" value. Then, the correct > font would be used automatically when painting. That's what I'm getting > at: just set the font attributes of the text inside the inset, and let > the drawing/latex output happen automatically... You mean, physically modify the underlying font structure of the text inside the inset? I am not at all sure this would be a good idea. How would inheritance work? (Say, you select a range containing the inset, and change some font attribute. Currently the attribute propagates to inside the inset. If the inset allows it, not, e.g., a footnote.) Note that the LaTeX rendering is done by outputting the LaTeX command or environment defined for the inset. Any font changes are implicit to the LaTeX definition (though for charstyles they are the whole purpose of the game). You don't want to put your own font changes on top of that. - Martin