On Mon, Aug 12, 2002 at 06:18:55PM +0300, Dekel Tsur wrote:
> > Ok: Character styles should be done by using something similar to
> > MathFontInsets. 
> 
> Regular font (i.e. commands like \textbf) should be implemented like character
> styles, so this means removing the font list from the paragraph class.

Math insets do not contain a font list either, so this is no
contradiction.

> > Advantages:
> >  * trivially to implement as almost everything is already there
> >    (mainly GUI is missing)
> >  * small code (currently about 150 lines in math_fontinset.C and
> >    math_factory.C, not much more to be done). 
> >  * allow proper nesting
> 
> It is also possible to support nesting using the current implementation,
> by changing the font list in the paragraph class to a tree.

At some additional cost. Inset nesting is "free" in mathed.

> >  * consistency with mathed
> >  * slightly different UI (it is clear whether cursor is inset or outside)
> > 
> > Known disadvantages:
> >  * Line breaking in the parent paragraph.
> >  * slightly different UI (extra cursor left/right to enter inset)
> 
> Other disadvantages:
> 
> 1) Current inset code doesn't allow inheritance of font settings from the
> current paragraph or from parent inset.
> For example, if I have a paragraph which set the font to italics
> (e.g. a Theorem paragraph), and I insert an inset (e.g. a tabular inset)
> the text in the inset will not be italics.

You are not talking about mathed's font insets, are you?

> 2) If you start a mouse selection from inside an inset,
> you cannot choose text which are outside of the inset.

Accepted to the disadvantages list. This needs code.

> 3) Pageup/down do not work inside an inset.

? Pageup/down work as an inset wishs.

> 4) Bookmarks do not work inside an inset.

What is a bookmark?

> (note that I checked the above in lyx-1.2.1cvs as I currently don't have
> lyx-1.3.0cvs here).
> 
> These disadvantages (esp. 1, and "line breaking" which you mentined)
> make insets a bad choice at this time for handling fonts & character styles.

I am not talking about _insets_, I am talking about "taking math font
insets as a base". These are different beasts.

> So we can either:
> 
> 1) Move font handling to insets and add character style support.
> Make the users suffer until the problem above are solved.
> 2) Add character style to lyxfont. Wait until inset code gets better, and
> then move font handling to insets.
> 3) Add character style to lyxfont. Keep the current scheme of font handling
> (namely storing font data in the paragraph class), but simplify the code.

4) Implement line wrapping in mathed.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)

Reply via email to