Closed
Bug 644885
Opened 14 years ago
Closed 14 years ago
math.stackexchange.com - Need to update to MathJax 1.1
Categories
(Tech Evangelism Graveyard :: English US, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: brad.quinn, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0
Build Identifier: Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0
MathJax rendered very nicely in FF 3.16
These two narrowly focused examples do not render the same in FF 4.0;
http://meta.math.stackexchange.com/questions/1528/firefox-4-and-mathjax-not
http://meta.math.stackexchange.com/questions/1845/bar-m-needs-love-in-firefox-4
Reproducible: Always
Steps to Reproduce:
1. Navigate to the sample URLS in the Details
The problem may be in MathJax, but I can't find how to file a bug against their product (http://www.mathjax.org/)
It may also be how MathJax is configured on http://math.stackexchange.com
![]() |
||
Comment 1•14 years ago
|
||
So if I look at http://meta.math.stackexchange.com/questions/1528/firefox-4-and-mathjax-not and focus on the exact markup generated by the page for the "a" in "$a = b$" then in 3.6 it looks sort of like this:
<span class="mi" id="MathJax-Span-17"
style="font-family: MathJax_Math; font-style: italic;">a</span>
while in 4 it looks sort of like this:
<span class="mi" id="MathJax-Span-16"
style="font-family: serif,serif;">a</span>
Observe the totally different font-family!
The issues with \not and so forth likely have to do with the fact that MathJax is using relative positioning tricks to create the overlap, which means that the result depends on font metrics. And it's styling the text with the wrong font in Firefox 4, so getting unexpected metrics. So far no obvious Gecko bug here; the only question is why the font style the page produces is different.
![]() |
||
Comment 2•14 years ago
|
||
Fwiw, the relevant script _seems_ to be <http://meta.math.stackexchange.com/content/js/third-party/MathJax/MathJax.js>. I'll attach a deobfuscated-ish version in a second.
![]() |
||
Comment 3•14 years ago
|
||
![]() |
||
Comment 4•14 years ago
|
||
Also relevant might be http://meta.math.stackexchange.com/content/js/third-party/MathJax/extensions/tex2jax.js
But that just converts from the TeX format to jax, whatever that is; it's not handling conversion to HTML.
![]() |
||
Comment 5•14 years ago
|
||
![]() |
||
Comment 6•14 years ago
|
||
![]() |
||
Comment 7•14 years ago
|
||
I see the "serif,serif" thing coming from handleFont.
Note that this last file has all sorts of browser-sniffing nastiness in it...
And now, the fun part. From the main MathJax file:
isFirefox: (document.ATTRIBUTE_NODE != null && window.directories != null),
This tests false in Firefox 4; there is no window.directories (see bug 474058). For good measure, isSafare, isMSIE, isOpera, isChrome, and isKonqueror are all also set to false.
Now back to the HTML/CSS output file, we have the browser-sniffing that only tries to use downloadable fonts if it recognizes the browser. So the script decides that you're using a browser that can't handle downloadable fonts, and it all falls apart.
Moral of the story: if you want to know whether a browser supports downloadable fonts, test _that_ instead of testing some random unrelated window.directories thing. ;)
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
![]() |
||
Comment 8•14 years ago
|
||
Oh, and MathJax 1.1, which seems to be the current version, has this instead (see https://github.com/mathjax/MathJax/zipball/v1.1 ):
isFirefox: (window.netscape != null && document.ATTRIBUTE_NODE != null &&
window.opera == null),
This happens to test true. For now.
So it sounds like StackExchange needs to upgrade.
![]() |
||
Comment 9•14 years ago
|
||
Brad, I'm hoping you'll pass this on to the StackExchange folks. Their inane commenting policies mean I can't comment there myself.
Reporter | ||
Comment 10•14 years ago
|
||
Thanks a lot Boris. They're usually very responsive.
Worth reopening, resummarizing, and moving to TE until StackExchange fixes itself?
![]() |
||
Comment 12•14 years ago
|
||
Yeah, I guess.
Assignee: nobody → english-us
Status: RESOLVED → REOPENED
Component: General → English US
Ever confirmed: true
Product: Core → Tech Evangelism
QA Contact: general → english-us
Resolution: INVALID → ---
Summary: The behavior of MathJax on http://math.stackexchange.com has changed in FF 4 → math.stackexchange.com - Need to update to MathJax 1.1
Reporter | ||
Comment 13•14 years ago
|
||
The StackExchange site has upgraded the version of MathJax that they're using.
Status: REOPENED → RESOLVED
Closed: 14 years ago → 14 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•