>>>>> "Amir" == Amir Karger <[EMAIL PROTECTED]> writes:
Amir> On Fri, 30 Oct 1998, Jean-Marc Lasgouttes wrote:
>> >>>>> "Asger" == Asger K Alstrup Nielsen <[EMAIL PROTECTED]> writes:
>>
>> >> >>>>> "Asger" == Asger Alstrup Nielsen <[EMAIL PROTECTED]> writes:
>> >> >> LyXFont::latexWriteStartChanges(LString & file, LyXFont const
>> & >> base) const { LyXFont f = *this; f.reduce(base); >>
>> f.setLatex(INHERIT); // ignore any latex change <<<<<<<<<<<<<<<<<<
Amir> That's smarter than the fix I came up with, for sure. Asger came
Amir> up with one that was better than mine, too, but approximately
Amir> equal to what you did.
The main default of this is that it does nothing. Smart, but useless.
Amir> The problem is that there are three LyXfont objects in
Amir> paragraph.C.
As you notived, I have figured out that %-}
Amir> Hm. Is it possible that if you were doing this, then you could
Amir> combine StartChanges and EndChanges? I wonder. But probably not,
Amir> because it sounds too elegant to be possible.
One non optimal solution would be to decide on a ``reasonable'' ordering
of font properties, like
size, series, shape, family, emph, underbar, latex
and change the font in this order, thus combining WriteStart and
WriteEnd so that we do not end uselessly some of the fonts. However,
there will be many cases where this will simply break...
Amir> I can't tell you exactly why the current system is used, but my
Amir> guess is that it's hard to keep track of how many font changes
Amir> you've made and need to make. Asger can probably give you
Amir> reasons. This way, every piece of text is given its own font
Amir> commands. FWIW, in reLyX I've got a "struct" that contains a
Amir> stack for each commandtype (size, series, etc.). I have no idea
Amir> if something like that would work for LyX and/or if it would be
Amir> too bulky and slow.
Yes, we need something like that. However, the situation is more
complicated, since we need to build the ordering ourselves, i.e. to
find what font change is more local than another.
JMarc