On Mon, Jul 09, 2001 at 05:33:55PM +0300, Dekel Tsur wrote:
> On Mon, Jul 09, 2001 at 04:02:40PM +0200, Andre Poenitz wrote:
> > Give me some precice rule like "basline of exponent should be aligned to
> > the upper border of the \sum" or similar (or you may have a look
> > yourself, it's Metrics/draw in math_bigopinset.C)
>
> Actually, the problem is a general problem with superscripts/subscripts.
> For example, a matrix with a superscript looks as follows:
>
> / \
> | 1 2 3 |
> | |2
> | 4 5 6 |
> | |
> | 7 8 9 |
> \ /
The method that should be fixed is MathScriptInset::draw.
However, how do I get the ascent/descent of the element before the
super/subscript ?
Looking at the 1.1.6 code, MathScriptInset::draw should be something like
if (up())
xcell(0).draw(pain, x, y - (xcell(0).descent()>ascent ?
xcell(0).descent()+4 : ascent) );
if (down())
xcell(1).draw(pain, x, y + descent + xcell(1).ascent()/2);
PS: I really don't like the use of the constant 4.