-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Some equations being misplaced under Chrome 7 on Windows and OS X. #24
Comments
Both of these now look okay, to me, but the same problem is occurring at, e.g. http://math.stackexchange.com/questions/120/is-1-a-prime-number/5735#5735 |
This appears to be an issue related to WebKit, as I also see it in Safari, and there are similar reports for the iPhone. I haven't tracked it down, but it looks like this happens when the math is at the end of the line, and I suspect that WebKit is forcing a line break somewhere that it shouldn't, and the positioning of the math is ending up being relative to the wrong container. (This may also be the source of the problem with using MathJax within SVG). I will need to look into the details of what is happening in this test case that you have provided. |
It must be a bug in Webkit rendering.The generated HTML looks fine, and if I do something simple like:
then the math appears in the right place. Or even right clicking on any math in the page will have the same effect (I guess that assumes MathMenu is enabled). Interestingly, the following works:
although at the end of the process the position style is back to the original, and other values of position (static, absolute) don't fix the rendering. |
I don't know anything about reporting bugs against WebKit, but if this won't happen otherwise I guess I can try. |
Thanks for the reminder - I've reported this in Webkit's issue tracker: |
I'm not able to reproduce the bug. |
Latest beta release of Chrome on OS X also look fine on these three examples. |
What about the reduced testcase at |
Someone has closed this bug but the status is still "accepted". I set the tag to "Cannot Reproduce". Feel free to change it back if you think it is not the right thing to do. |
The reduced test-case still fails for me in Chrome 10 on OS-X. I still see the bug in the wild, e.g. Do others not see this behavior? |
I'm not sure how the issue was closed (other than that it is very easy to hit "commit and close" rather than "commit"). I still see the problem in the test page you indicate, in both Chrome and Safari. I have seen similar things in Safari on the iPhone (but haven't looked recently). I think this is still an active bug, so I'm opening it again. Davide |
I still see the issue with Chrome (version 13.0.782.107 beta) and Safari on mac OS X Lion (10.7). I see it on the page "http://greedyalgs.com/blog/chernoff-bound/" on the third paragraph from the top -- an "X" is appearing above the paragraph to the left, instead of at the start of the last line where it should be. Interestingly, if I right-click on the out-of-place "X", it moves to its correct place. Screenshots are at "http://greedyalgs.com/good.png" and "http://greedyalgs.com/bad.png". -Neal |
I don't see Webkit addressing this until there is a significantly reduced test-case, i.e. one that doesn't use MathJax. |
I haven't been able to produce such a test case, and have trouble reproducing the problems that others see even on the cited pages, probably due to font differences. For instance the page nealeyoung cites uses Davide |
I've posted a minimal bad example using times new roman font at http://greedyalgs.info/bad.html . It should look like
but it shows up like
I'm attempting to put the html here also: <!DOCTYPE html>
<html dir="ltr" lang="en-US"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
</head>
<body>
<p style="width:1em;font-family:'Times New Roman'">00 <script type="math/tex;">X</script> 0 </p>
</body></html> |
That's great! Thanks, you saved me a lot of work isolating this. I will see what I can figure out from that. Davide |
…et properly placed (resolves issue mathjax#24)
Thanks very much for the testcase. I've been able to reproduce the problem and converted it into a != reftest. http://devel.mathjax.org/testing/testsuite/Configuration/Contexts/issue24.html http://devel.mathjax.org/testing/testsuite/Configuration/Contexts/issue24.html?mathJaxPath=http://devel.mathjax.org/testing/mathjax/dpvc/v2.0-candidate/ ==> in testsuite |
I have a similar problem (firefox on the left, chrome on the right): http://imageshack.us/f/703/bugdt.png/ You can find the bug on this page: cheers |
Or you sure it is the same issue? On your screenshot, it seems that some parts of the equations disappear, while this bug is about misplaced formulas. Is it possible for you to try with the v2.0 candidate? |
yeah you are right. yes it is possible, can i get 2.0rc from a cdn? |
You can try with http://devel.mathjax.org/testing/mathjax/dpvc/v2.0-candidate/MathJax.js (Note however, that some configurations will change in MathJax 2.0) |
I can't get 2.0 working with chrome at all (gives me: [Math Processing Error]) :/ it seems to have trouble loading the imagefonts I am using the TeX-AMS-MML_HTMLorMML config |
Yes, the image fonts are not available on this branch (I don't know why your Chrome browser does not use webfonts). |
I think you should use http://devel.mathjax.org/mathjax/dpvc/v2.0-candidate/MathJax.js rather than the Davide |
Oh I am sorry. Mathjax 1.1 (latest stable) was working fine with Safari. I thought that webkit in general was affected. So this is a Chrome only issue. It seems as if my co-workers removed the problematic formula without notifying me. I restored it so you can trace the bug (or whatever it is :) ) The Link is: http://www.serlo.eu/math/topics/show/Analysis/Infinitesimalrechnung/Kurvendiskussion/Aufgaben_zur_Kurvendiskussion |
I looked briefly at it the day you reported the problem, and it is not the same issue as this one. I suspect it is because the math is typeset while the containing element has I haven't looked into how you are doing the revealing of the answers. If the contents of the answer is being loaded into the page dynamically and typeset once it is loaded, then you might try revealing the answer first and then typesetting. That would at least tell us if the problem is due to the math not being displayed at the time it is typeset. If it is already part of the page initially (and so typeset during the initial typesetting pass), and is just being revealed, then that test can't be performed. (Though a different but harder one would be possible.) Davide |
The content is loaded dynamically into the solution div. The event (dom:changed) gets fired as soon as prototype hits ajax.responders.onComplete() which gets called after ajax.responders.onSuccess but I am not 100% sure about that! But if it didn't the Math would not be processed at all, would it? |
The Typeset() method is certainly getting called; the question is whether the mathematics is within a The issue I'm thinking it is would be with the timing of the All this is guesswork; this might not be the problem at all, but I am pretty sure it has something to do with the interaction of the ajax with MathJax. |
Oh I am so sorry it seems as if this is not a MathJax issue at all but an issue with chrome itself. It seems as if the table cuts off the content regardless of it being MathJax or MathML or just regular text. I am very thankful for your help and hope you didn't waste to much time trying to find a solution for this issue :) |
FYI, I've modified how the MathJax branches are retrieved. The image font directory are still removed on branches to save disk place, but a symbolic link to the corresponding file in the master branch are used. That allows to use the image fonts with all the branches. |
That's fine, unless there are changes to the image fonts in some branch (which is not currently the case, but could happen in the future). Just something to keep in mind about this setup. |
The issue reported here https://bugs.webkit.org/show_bug.cgi?id=50210 is marked fixed. However, we still force a reflow as a workaround. Is it still necessary? |
There have been several bug reports on MathOverflow (c.f. the MathJax bug report thread there) of equations being misplaced on the page when running Google Chrome 7.
Here are some examples:
In both cases, it's the last equation in a paragraph appearing before the beginning of the paragraph, instead of inside the text.
The text was updated successfully, but these errors were encountered: