Align BUG

8 views
Skip to first unread message

mikev3

unread,
Aug 3, 2011, 2:17:04 PM8/3/11
to MathJax Users
Hi, I noticed that there is a bug with \begin{align} when rendering
with MathML. At first the page renders properly, but choose:
1. "Math Renderer -> HTML-CSS"
2. "Math Renderer -> MathML"

And the alignment breaks!

mikev3

unread,
Aug 3, 2011, 2:18:30 PM8/3/11
to MathJax Users
Forgot this test link! Sorry:

<a href="http://www.rootmath.org/test/align-test">http://
www.rootmath.org/test/align-test</a>

Davide P. Cervone

unread,
Aug 5, 2011, 7:19:11 AM8/5/11
to mathja...@googlegroups.com
It looks like there is a rendering bug in Firefox that is causing
this. The MathML produced by MathJax is OK, and indeed, if you turn
on the debugger, or do something else that forces a reflow, Firefox
will render it correctly again. I will look into whether I can force
that to occur, but preliminary tests haven't been encouraging.

Davide

Frédéric WANG

unread,
Aug 5, 2011, 7:24:10 AM8/5/11
to mathja...@googlegroups.com
--
Frédéric Wang.
Website - Weblog

Davide P. Cervone

unread,
Aug 5, 2011, 8:06:48 AM8/5/11
to mathja...@googlegroups.com
It does seem similar, but FYI, moving the mouse into the column doesn't fix the alignment (as it does in the bug you reference).  I HAVE seen that behavior in other examples, but this one doesn't seem to have it.

Davide

Frédéric WANG

unread,
Aug 5, 2011, 8:12:42 AM8/5/11
to mathja...@googlegroups.com
Le 05/08/2011 14:06, Davide P. Cervone a �crit :

> It does seem similar, but FYI, moving the mouse into the column
> doesn't fix the alignment (as it does in the bug you reference). I
> HAVE seen that behavior in other examples, but this one doesn't seem
> to have it.
>
> Davide
Moving the mouse in the column to fix the alignment was reported by Joe
Java, but I can't remember this behavior.

FYI, The bug entry also contains a reduced testcase, here:
https://bug491384.bugzilla.mozilla.org/attachment.cgi?id=427195

Davide P. Cervone

unread,
Aug 5, 2011, 8:40:23 AM8/5/11
to mathja...@googlegroups.com
I have certainly seen it in other cases where the alignment is
initially wrong. (I know that the Maxwell's Equation array on the TeX
examples page has been one place where that has occurred for me). But
the test given by mikev3 doesn't respond to that (though it does
reformat properly if you zoom in and out).

Davide


On Aug 5, 2011, at 8:12 AM, Frédéric WANG wrote:

mikev3

unread,
Aug 5, 2011, 11:04:02 AM8/5/11
to MathJax Users
Hi, thanks for the responses. I initially came across this because I
have a page that actually loads improperly to begin with:
http://rootmath.org/calculus/solving-limits If the page is initially
rendered with MathML the alignment is broken for the Summary.

Vidoes Tab -> Click "Summary"

As mentioned, zooming in and out fixes this issue, but the initial
display is wrong.

Mike

mikev3

unread,
Aug 5, 2011, 11:18:57 AM8/5/11
to MathJax Users
I did some looking around, in the original link: www.rootmath.org/test/align-test
there is a difference in the MathML between the broken alignment and
the correct alignment.


//BROKEN ALIGN
====================
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mtable columnalign="right left right left right left right left
right left right left" rowspacing="3pt"
columnspacing="0.2777777777777778em 2em 0.2777777777777778em 2em
0.2777777777777778em 2em 0.2777777777777778em 2em 0.2777777777777778em
2em 0.2777777777777778em" displaystyle="true">
<mtr>
<mtd>
<mrow>
<munder>
<mo form="prefix" movablelimits="true">lim</mo>
<---- form = "prefix"

//CORRECT ALIGN
====================
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mtable columnalign="right left right left right left right left
right left right left" rowspacing="3pt"
columnspacing="0.2777777777777778em 2em 0.2777777777777778em 2em
0.2777777777777778em 2em 0.2777777777777778em 2em 0.2777777777777778em
2em 0.2777777777777778em" displaystyle="true">
<mtr>
<mtd>
<mrow>
<munder>
<mo movablelimits="true">lim</mo> <----------
the form = "prefix" is removed



This difference is present for every <mo movablelimits="true"> tag.
The broken align includes the 'form="prefix"' the correct align does
not. Sorry for the messy post, if I knew how to upload a file or
screenshot I would do that so I can point you to line numbers ect.

Thanks,
M.

Frédéric WANG

unread,
Aug 5, 2011, 11:28:13 AM8/5/11
to mathja...@googlegroups.com
Thanks for looking into this.
Did you test with pages that directly use MathML in HTML (without MathJax)?
The form = "prefix" may be added by MathJax without having actually any
effect on the rendering.

Le 05/08/2011 17:18, mikev3 a �crit :

mikev3

unread,
Aug 5, 2011, 11:32:36 AM8/5/11
to MathJax Users
All I did was view www.rootmath.org/test/align-test Then I viewed the
math source (using mathjax) as MathML. I compared the source of the
broken alignment with the source from the correct alignment. Again
these sources are coming from MathJax. I'm not very tech savy, I've
learned everything I know in pieces on my own so I hope this answers
your question!

M.

Frédéric WANG

unread,
Aug 5, 2011, 11:36:12 AM8/5/11
to mathja...@googlegroups.com
Thank you for the info, that's what I thought.
Can you please create HTML pages and copy and paste the MathML sources
coming from MathJax (for both the correct and broken alignment), and
tell me what you get with Firefox?

mikev3

unread,
Aug 5, 2011, 12:28:44 PM8/5/11
to MathJax Users
Ok, I created an HTML page with the copy and pasted MathML source.
Apparently the only formatting difference is the thickness of the line
in the fraction.

www.rootmath.org/test/align-test-html

Thanks,
M.

On Aug 5, 11:36 am, Frédéric WANG <fred.w...@free.fr> wrote:
> Thank you for the info, that's what I thought.
> Can you please create HTML pages and copy and paste the MathML sources
> coming from MathJax (for both the correct and broken alignment), and
> tell me what you get with Firefox?
>
>
>
>
>
>
>
> > All I did was viewwww.rootmath.org/test/align-test Then I viewed the

mikev3

unread,
Aug 5, 2011, 12:30:22 PM8/5/11
to MathJax Users

mikev3

unread,
Aug 5, 2011, 12:29:37 PM8/5/11
to MathJax Users
correct link: http://rootmath.org/test/align-test-html

On Aug 5, 12:28 pm, mikev3 <mikevai...@gmail.com> wrote:

Davide P. Cervone

unread,
Aug 5, 2011, 6:26:19 PM8/5/11
to mathja...@googlegroups.com
Thanks for the detective work. I don't think the form="prefix" is the
culprit, however, as the browser properly displays it after a reflow.
It certainly seems to be a browser bug, not a MathML problem, and one
that occurs only under certain circumstances that are not easy to
generate. I'm glad to have your example that is reproducible, but I
suspect we will have to wait for Firefox to fix this one. You might
consider using the HTML-CSS renderer for Firefox, rather than its
native MathML renderer, as this is more reliable with MathJax, though
somewhat slower.

Davide

Reply all
Reply to author
Forward
0 new messages