[l2h] problem with vertical alignment of inlined math images
Bruce Miller
bruce.miller at nist.gov
Thu Dec 11 15:24:27 CET 2003
Ross Moore wrote:
> Hi Bruce, Peter and others.
> On Thursday, December 11, 2003, at 01:24 AM, Bruce Miller wrote:
>> Peter Morling wrote:
>>> Hi,
>>> there is a problem with the vertical alignment of inlined math
>>> images.
[...]
> Yes. It used to be that Netscape got this right, and IE aligned
> according to the middle of the surrounding text.
> (as the CSS way, described below).
>
> However, this IE/CSS way *cannot* be correct for inline images, since
> 1. you don't know the height of the text in advance --- that's under
> the surfer's control;
> 2. the height varies according to the presence of CAPITAL letters
> and letters with descenders (g,j,p,q,y);
> 3. simply resizing the window, forcing text to re-flow, causes the
> relative position of images to shift vertically
> ---- a quite absurd situation.
Hmm, from this, I suspect the old IE way was to align the middle
of the image to the middle of the surrounding text --- a pretty fuzzy
font concept! --- which apparently included ascenders & descenders.
CSS aligns it to the baseline + half the x-height, which would
only be affected by the font in neighboring text, not the actual
letters. So the window size, flow, etc, shouldn't generally matter.
> It is for these reasons that LaTeX2HTML continues to use the old
> Netscape interpretation of "align=middle".
> Any other is inherently impossible to predict how things will look.
[...]
> Precisely.
> If you specify *everything* with CSS, including the fonts and
> font-sizes, and window-widths,
> then you can position images precisely.
>
> But that forces readers to view pages only with a very specific geometry.
> You lose the ability to freely adjust the window size and have all the
> text re-flow to match.
> Also, the reader/surfer loses control of the font-size that is most
> comfortable for themself.
Actually, it's not quite this bad. I've created some material using
the CSS approach & varied the text size (Mozilla's control-mouse-wheel
to adjust font size is one of my favorite features! That and tabs!)
The alignment stays reasonable, if not perfect, over a pretty wide range.
--- The fixed size of the math images gets annoying _way_ before the
misalignment becomes bothersome!
[...]
>> Or, wait for the mozilla folks to fix it. From the bugzilla log, it
>> looks like after some initial resistance, they've accepted that it is
>> a bug.
>
> Agreed; it is a bug in the browser.
I agree; unless there were a drive to eliminate _all_ deprecated features
from l2h, it's not really worth changing.
If anything, I'd like to campaign to make images look worse, & mathml better,
to encourage the transition to the latter! :>
--
bruce.miller at nist.gov
http://math.nist.gov/~BMiller/
More information about the latex2html
mailing list