-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Native MathML: add a workaround for <mlabeledtr>, rowspacing/columnspacing #356
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
Comments
One of the most important missing features in Gecko/Webkit is mtable@rowspacing/mtable@columnspacing. These attributes are used a lot by the TeX input Jax so I'm stretching a bit this issue to include them. https://bugzilla.mozilla.org/show_bug.cgi?id=330964 I suspect this could be implemented by editing CSS properties on the table cells. The browser's default rules are: http://mxr.mozilla.org/mozilla-central/source/layout/mathml/mathml.css#301 and be dynamically updated. The MathML CSS profile used by Opera contains mtd { display:table-cell; padding:0 0.5ex; }. |
@dpvc You said that you did some experiments with mabeledtr. Can you publish your work? I think I can take this issue and try something for rowspacing/columnspacing too. |
I had one small piece to add before committing it. I'll see if I can get to that today. |
OK, my |
Thanks! I didn't look the code in details, but that looks great. I've verified that it works as expected for the basic tests from MathMLToDisplay/Presentation/TablesAndMatrices/mlabeledtr/ (essentially those of the MathML Test suite). I'll see if I can do something for rowspacing/columnspacing. |
Note that this commit also include adding the |
OK, thanks. The bug with mspace/mpadded in table will be fixed, so no need to attach a style attribute for Gecko >= 20. I didn't get any update yet regarding the patch I submitted last November, to implement negative mspace@width (or at least to implement it partially, but I think it is enough for MathJax use cases, there are experimental builds here: http://www.wg9s.com/mozilla/firefox/) |
I've created a fork of your issue356 branch and commited some changes to implement rowspacing/columnspacing. I realized that your commit says it implements malebeledtr for "Firefox and other browsers" but there is still a "HUB.Browser.isFirefox" around the section you added. I don't know if that's on purpose... |
Well, I hadn't completely finished the code, and committed it so you could start to work with it. I guess that needs to be something like |
OK, I can try to fix this and finish the work. But the code to set the padding on the cell didn't seem to work very well with Chrome, at least when I tried this morning. |
It turned out that my code used the DOM element interface but for some reason I have to use the DOM node interface to make it work with Chrome. I updated my branch with these changes as well as those mentioned in the review. I also added the nMML bug properties. It does not seem possible to make this work on Opera, so let's not do it. |
OK, good to know about Chrome. About Opera, I'm not surprised. The question is whether the original rendering of |
Actually, I think mlabeledtr is not implemented at all in Opera: http://www.opera.com/docs/specs/presto2.12/mathml/ so I guess we can enable our workaround for mlabeledtr Opera too (the one for rowspacing/columnspacing does not change anything) |
Sounds good. I thought that might be the case. |
I have reported this bug to Webkit: I don't think the code will append non-element nodes like comments or text as children of mtable or mtr, so that should be safe to keep the node interface. But perhaps it may be better to use firstElementChild/nextElementSibling as this seems to work in Chrome. |
I updated my branch: |
I updated my branch again to modify your variables and follow the coding style. I think the code should be ready now. |
Since this is merged into the branch for issue #359, it will be merged into => Ready to Release |
And thus you can merge this too. |
=> Merged as 0891402 |
is used in the code generated by MathJax from LaTeX (for equation labeling) but browsers like Webkit, Gecko or Opera do not support this element:
https://bugzilla.mozilla.org/show_bug.cgi?id=689641
https://bugs.webkit.org/show_bug.cgi?id=85732
http://www.w3.org/TR/mathml-for-css/#d2e2181
cf the discussion on mathjax-dev
The text was updated successfully, but these errors were encountered: