Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NativeMML doesn't handle \tag properly in Firefox #993

Closed
dpvc opened this issue Jan 5, 2015 · 9 comments

Comments

Projects
None yet
2 participants
@dpvc
Copy link
Member

commented Jan 5, 2015

Now that Firefox doesn't process style attributes any longer, the current work-around for tags doesn't work. The <mrow style="width:100%"> is not getting to be the correct width. Technically, this is a browser bug, since <mrow><mtable width="100%">...</mtable></mrow> is supposed to operate exactly like <mtable width="100%">...</mtable>, but it doesn't.

The solution is either to not include the outer <mrow> when the content is table with width set, or to make a CSS class setting for width:100% and use that instead of explicit style.

@pkra

This comment has been minimized.

Copy link
Member

commented Jan 6, 2015

Do you have a minimal example of the FF bug that we can use to file an upstream bug?

@dpvc dpvc added this to the MathJax 2.5 milestone Jan 13, 2015

@dpvc

This comment has been minimized.

Copy link
Member Author

commented Jan 13, 2015

OK, it turns out not to be the reason that I thought. The <mrow> with style is fine, it is the additional <semantics> element that is causing the problem. For example

<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
  <semantics>
    <mtable width="100%" mathbackground="red">
      <mtr> <mtd><mi>x</mi></mtd> </mtr>
    </mtable>
    <annotation encoding="application/x-tex">x</annotation>
  </semantics>
</math>

does not produce the same result as

<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
  <mtable width="100%" mathbackground="red">
    <mtr> <mtd><mi>x</mi></mtd> </mtr>
  </mtable>
</math>

though I believe it should. A work-around is to use style="width:100%" on the <semantics> element, as in

<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
  <semantics style="width:100%">
    <mtable width="100%" mathbackground="red">
      <mtr> <mtd><mi>x</mi></mtd> </mtr>
    </mtable>
    <annotation encoding="application/x-tex">x</annotation>
  </semantics>
</math>

though that should not be necessary. In any case, I can use this for now to get around the problem.

dpvc pushed a commit to dpvc/MathJax that referenced this issue Jan 13, 2015

@dpvc

This comment has been minimized.

Copy link
Member Author

commented Jan 13, 2015

The work-around is in the issue993 branch of my fork of MathJax.

@pkra

This comment has been minimized.

Copy link
Member

commented Jan 14, 2015

Thanks for the example. I've asked the MathWG to comment.

@pkra pkra assigned dpvc and unassigned dpvc Jan 14, 2015

dpvc pushed a commit to dpvc/MathJax that referenced this issue Jan 14, 2015

@dpvc

This comment has been minimized.

Copy link
Member Author

commented Jan 14, 2015

==> Merged

@dpvc dpvc added Merged and removed Ready for Review labels Jan 14, 2015

@dpvc dpvc closed this Jan 14, 2015

@dpvc

This comment has been minimized.

Copy link
Member Author

commented Jan 15, 2015

My previous commit only fixed the problem for the situations generated by the TeX input jax. If the input is directly from MathML and output is NativeMML, this is still a problem. The NativeMML output jax should tweak the output in this case as well.

dpvc pushed a commit to dpvc/MathJax that referenced this issue Jan 15, 2015

dpvc pushed a commit to dpvc/MathJax that referenced this issue Jan 15, 2015

dpvc pushed a commit to mathjax/MathJax-test that referenced this issue Jan 15, 2015

@dpvc dpvc added Test Available and removed Test Needed labels Jan 15, 2015

@dpvc

This comment has been minimized.

Copy link
Member Author

commented Jan 15, 2015

==> In Testsuite

MathMLToDisplay/Presentation/TablesAndMatrices/issue993-1a.html
MathMLToDisplay/Presentation/TablesAndMatrices/issue993-1b.html
MathMLToDisplay/Presentation/TablesAndMatrices/issue993-1c.html
MathMLToDisplay/Presentation/TablesAndMatrices/issue993-1d.html
MathMLToDisplay/Presentation/TablesAndMatrices/issue993-1e.html
MathMLToDisplay/Presentation/TablesAndMatrices/issue993-2.html
MathMLToDisplay/Presentation/TablesAndMatrices/issue993-3.html

@pkra

This comment has been minimized.

Copy link
Member

commented Jan 30, 2015

I think this Gecko bug is a case of https://bugzilla.mozilla.org/show_bug.cgi?id=468059

@pkra

This comment has been minimized.

Copy link
Member

commented Jan 30, 2015

Great.. the workaround renders very badly on WebKit... http://jsbin.com/gimevacori/1/edit

@dpvc dpvc added Fixed v2.5 and removed Merged labels Jan 30, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.