LaTeX Why are MathJax images not displaying on my webpage?

AI Thread Summary
MathJax has been enabled on the site, but users are experiencing issues with LaTeX images not displaying correctly, leading to frustration over the appearance and functionality. Some users report that certain LaTeX environments, like align and tabular, are not rendering properly, and there are inconsistencies in how equations appear across different browsers. The transition from image-based LaTeX to MathJax is intended to reduce server load, but users are concerned about the visual quality and usability of the new format. Feedback indicates that while MathJax can handle more equations without server strain, it may introduce rendering issues that affect the user experience. The discussion reflects a need for further adjustments and testing to optimize MathJax's implementation.
  • #151
I tried that last night but it broke IE9. I have now added a conditional. Can anyone report if IE8 is better now?

Well I tried relaxing all the security onIE8, but it has made no discernable difference.
 
Physics news on Phys.org
  • #152
I have a similar problem with Safari 4.1.3 … nothing happens for some time, then an error message appears, something like "Safari is no longer responding because of a script, do you wish to stop the script?".

I click "Stop", and the problem stops (but the latex doesn't load).

This only happens occasionally, and for no apparent reason.
 
  • #153
Studiot said:
Well I tried relaxing all the security onIE8, but it has made no discernable difference.
Can you upgrade to IE9? I know that some people aren't allowed to do this by their IT departments (e.g. DaleSpam), but if no one is stopping you... And FF4 is an even better option in my opinion.

Obviously, Greg will do what he can to get it to work with IE8, but if you want it to work for you before he finds the solution...
 
  • #154
tiny-tim said:
I have a similar problem with Safari 4.1.3 … nothing happens for some time, then an error message appears, something like "Safari is no longer responding because of a script, do you wish to stop the script?".

I click "Stop", and the problem stops (but the latex doesn't load).

This only happens occasionally, and for no apparent reason.
I've occasionally had the same thing happen on Firefox. It's been rare enough - maybe once or twice in total on PF - that I haven't considered it a serious problem; I just stop the script, reload the page, and things are fine.
 
  • #155
Can you upgrade to IE9?

Thank you for the interest.

IE9 and above are not available for Windows XP.

And, of course it is not possible to put Vista or 7 onto a Dell GX270.

There are more copies of IE8 installed in the world than any other browser, or I think any other two browsers put together.


Yes I tested Chrome and Fox tonight on a different XP computer and both worked, albeit slowly. IE8 didn't render the Tex on that pc though.
 
  • #156
Studiot said:
There are more copies of IE8 installed in the world than any other browser, or I think any other two browsers put together.

Logs of my sites don't support the second part - 18.6% of my visitors use IE8, 21.4% use FireFox 3.x or 4.x.
 
  • #157
Logs of my sites don't support the second part - 18.6% of my visitors use IE8, 21.4% use FireFox 3.x or 4.x.

I'm not at all suprised. But that's a bit like asking the % of 2 wheel drive vehicles at a Landrover convention. Fox, et all are specialist niche browsers.

Most of my customers fall into two groups.

Those that can just about turn their pc on. I know it's not scientific but I doubt that more than 1 in 20 of these has something other than IE on the pc.

Those that are constrained by their IT department to IE, regardless of their computer skills.
 
  • #158
Studiot said:
Thank you, vela for offering a glimmer of hope.

The (error) messages in my browser clearly indicate that the browser is being redirected to MathJax .org to obtain some file but is unable to succeed.
I think I saw the same thing. The error message said "access denied" for some JavaScript file. IE8 worked for a while, then I got that message for a while, and then it started working again. I don't remember doing anything to break it or fix it.

Sometimes it seems like IE8 isn't working, but it actually is. It's just painfully slow.

If you're stuck on XP, switching to Firefox may be your best solution for now.
 
  • #159
Thank you Vela for your interest.

One of my concerns is the provenance of MathJax.
If they were really as good as sliced bread then their Latex processor should not cause this with IE8.
On the other hand, I trust PF.
But I am now being asked to hand off script control of my pc to another site I had never even heard of until a couple of weeks ago.
So do I trust Mathjax?
Well I perhaps you have heard of Viewpoint spyware, as installed with and by AOL?
So my answer is I don't yet know.
I do know, however, that my original reason for into getting Latex (via MathType) still works as before.
This was for another teaching site, based in Toronto - Allaboutcircuits.
 
  • #160
Preparing a site that looks OK in every browser, even if you are using just HTML and CSS is a real PITA. When it needs Java Script it becomes almost impossible.
 
  • #161
Studiot said:
Thank you Vela for your interest.

One of my concerns is the provenance of MathJax.
If they were really as good as sliced bread then their Latex processor should not cause this with IE8.
On the other hand, I trust PF.
But I am now being asked to hand off script control of my pc to another site I had never even heard of until a couple of weeks ago.
So do I trust Mathjax?
Well I perhaps you have heard of Viewpoint spyware, as installed with and by AOL?
So my answer is I don't yet know.
I do know, however, that my original reason for into getting Latex (via MathType) still works as before.
This was for another teaching site, based in Toronto - Allaboutcircuits.

That's a good point, and one that concerns me also. I use Firefox 4 with NoScript, and I only allow scripts for sites that I trust.
 
  • #162
Greg Bernhardt said:
I tried that last night but it broke IE9. I have now added a conditional. Can anyone report if IE8 is better now?
I just tried IE8, and it's still really slow. It took almost 2 minutes to finish processing this page. Firefox and Safari process the same page in about a second or less.EDIT: It appears IE8 is, simply, inherently slow compared to other browsers when it comes to JavaScript performance. I ran the SunSpider benchmarks to compare IE8 and Firefox 4.0.1, both on XP. IE8 took about 5900 ms to complete the tests while Firefox took only 370 ms. I wonder if MathJax happens to use those JavaScript functions IE8 just really sucks at.

http://www.webkit.org/perf/sunspider-0.9.1/sunspider-0.9.1/driver.html
 
Last edited:
  • #164
fluidistic said:
This probably mean latex will be changed once again and this will be sad as it never looked so beautiful to me. :)

No MathJax is the future. With new developments and the steady pace of browser upgrades we should be able to cover almost all visitors in the near future.
 
Last edited:
  • #165
If javascript is disabled in your browser, you will see the source code instead of an image. This page will tell you if you have javascript enabled, and how to enable it if you don't:

http://www.iatn.net/help/javascript/
 
  • #166
Fredrik said:
If javascript is disabled in your browser, you will see the source code instead of an image. This page will tell you if you have javascript enabled, and how to enable it if you don't:

http://www.iatn.net/help/javascript/

I've also requested to the devs that they have some sort of detection and alert the user if JS is off.
 
  • #167
Studiot said:
But I am now being asked to hand off script control of my pc to another site I had never even heard of until a couple of weeks ago.
Not really, the script can't control your computer entirely, it can only do certain things within your web browser. Of course that is something one could be validly concerned about, but it's a bit easier to control than the common computer virus.

In any case, MathJax is no different from all the other external Javascript libraries that most websites use, like jQuery, or YUI (which PF uses). If you haven't been concerned about handing off control of your computer to Yahoo every time you visit PF, then you shouldn't worry about MathJax. (FWIW many people have looked into MathJax closely enough to verify that it doesn't do anything nefarious - it is open-source, after all.)
 
  • #168
Thank you Fredrik for that link, most useful.

My IE8 passed with flying colours.

But I still can't see the NewTex.

:cry:
 

Attachments

  • js1.jpg
    js1.jpg
    38.4 KB · Views: 402
  • #169
Wouldn't adding something like:
Code:
<noscript>
Your browser appears to have
JavaScript functionality disabled.
To view mathematics on Physics Forums,
please enable JavaScript.
</noscript>
work?
 
  • #170
Studiot said:
My IE8 passed with flying colours.

But I still can't see the NewTex.

do any errors pop up? i think if there are js errors there is an icon on the bottom left that triggers?
 
  • #171
Greg, you can see the bottom left of the java test page shows "done" in my pic.

I am conscious of storage space so please feel free to delete this attachment when it has served its purpose (or tell me how)

On every PF page, including the 'manage attachments' popup, I get the yellow triangle and either error on page or sometimes done, just as ion the pics I posted in the other thread.

Thanks for looking.

Edit: the error details on this page for instance are:


Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0)
Timestamp: Mon, 23 May 2011 19:12:12 UTC


Message: Access is denied.

Line: 45
Char: 495
Code: 0
URI: http://cdn.mathjax.org/mathjax/latest/config/TeX-AMS-MML_HTMLorMML.js


Message: Expected identifier, string or number
Line: 1
Char: 6
Code: 0
URI: https://www.physicsforums.com/showthread.php?p=3318128&posted=1#post3318128
 
  • #172
Can someone show me a TeX on the forums for a double closed integral?

I tried \ooiint (yeah I know lol) and it didn't work
 
  • #174
flyingpig said:
Can someone show me a TeX on the forums for a double closed integral?

I tried \ooiint (yeah I know lol) and it didn't work

If I understand the comprehensive LaTeX symbol list correctly, you can use \oiint if you have loaded the wasysym package. PF doesn't seem to include that package (it's not one you need very often), but if you're writing a LaTeX document, you can include it there.

Edit: D'oh.
 
  • #175
Sorry Frederik :biggrin:
 
  • #176
micromass said:
Edit: it seems PF doesn't have the right packages for it. But there are lots of packages that let you do this. See the link above, page 26 onwards...

remember we are using mathjax :)
 
  • #177
Here's another one that works: \iint\!\!\!\!\!\!\!\!\!\!\!\bigcirc \ f(x,y)dxdy

\iint\!\!\!\!\!\!\!\!\!\!\!\bigcirc \ f(x,y)dxdy
 
  • #178
Let's see

\iint\!\!\!\!\!\!\!\!\!\!\!\!\!\!\bigcirc \
 
Last edited:
  • #179
flyingpig said:
Let's see

\iint\!\!\!\!\!\!\!\!\!\!\!\!\!\!bigcirc \

You need \bigcirc, not bigcirc...

I don't know how TeX-savy you are, but \! is a negative space, it moves the cursor to the left. This allows you to type over other symbols or closer to previous symbols. There are better ways to do this, but MathJax will probably not allow this...
 
  • #180
Greg Bernhardt said:
I tried that last night but it broke IE9. I have now added a conditional. Can anyone report if IE8 is better now?
The META tag inside the conditional comment is broken because you have a line break between http- and equiv, but fixing that, unfortunately, doesn't do any good. [strike]When IE8 is emulating IE7, it doesn't like the inline configuration script for MathJax. That's easy enough to fix by using a configuration file instead.[/strike] The bigger problem is that when the META tag is inside the conditional comment, you don't get the performance gain for some reason. Simply taking the META statement out of the conditional comment results in the page rendering much more quickly.

So maybe you can fix it by using EmulateIE7 as the default and then telling IE9 to switch back to IE9 mode:
Code:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">  
<!--[if IE 9]>
    <meta http-equiv="X-UA-Compatible" content="IE=IE9">
<![endif]-->
I don't have IE9 here, so I can't test it.

EDIT: Didn't notice I had compatibility mode on. I think that was causing IE8 to choke on the inline configuration.

EDIT 2: Hmm, seems IE8 sometimes doesn't like the inline configuration, and other times, it doesn't complain.
 
Last edited:
  • #181
vela said:
So maybe you can fix it by using EmulateIE7 as the default and then telling IE9 to switch back to IE9 mode:

ah yes good catch vela! fixing now! IE8 users please report back any changes in performance
 
  • #182
\iint\!\!\!\!\!\!\!\!\!\!\!\!\!\bigcirc \

edit: THAT'S IT I GIVE UP
 
  • #183
Greg,

Apparently, you can have only one X-UA-Compatible meta tag in a page, and it needs to be outside of the conditional comment to get the performance gain in IE8. Unfortunately, when you do this, it causes a JavaScript error in IE9 with the inline configuration you have for MathJax. The solution is to read in the settings from a file. When I did this, both IE8 and IE9 rendered quickly.

To create the settings file, I just grabbed defaults.js from the MathJax distribution and tweaked it with your settings. You also have to update the URL at the bottom of the file, per the MathJax documentation, otherwise you'll get a long delay when the page loads.

So what you want is this:

Code:
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />  

    <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <script type="text/javascript" src="[PLAIN]https://www.physicsforums.com/default.js"></script>[/PLAIN] 
</head>
 
Last edited by a moderator:
  • #184
ok we are now loading the config file locally. please report any performance changes
 
  • #187
Greg Bernhardt said:
what are you using to view?

Firefox. I've checked IE, and the formula comes out nice there...

Also, loading LaTeX is really slow right now. It takes about a minute before things start loading.
 
  • #188
micromass said:
Firefox. I've checked IE, and the formula comes out nice there...

Also, loading LaTeX is really slow right now. It takes about a minute before things start loading.

It takes 60 seconds for the equations to show in FF!?
 
  • #189
Yes, it did. But the issue seems resolved now, it goes quite fast now! It was probably something with my connection...
 
  • #190
micromass said:
Also, loading LaTeX is really slow right now. It takes about a minute before things start loading.

In a way funny:

attachment.php?attachmentid=35866&stc=1&thumb=0&d=1306258109.png


This must be something with mathjax servers, when they are not fast enough, there are problems
 

Attachments

  • Untitled-1.png
    Untitled-1.png
    2.2 KB · Views: 448
  • #191
A lot of the old Latex don't work in long equation even though it work here eg

\left[ \frac 1 c \right ]

If you look at the latex code, it is perfectly legal. I don't think the new one is better, it is worst. Yes, the older one has some problem, but the new one is very inconvenient.
 
  • #192
yungman said:
A lot of the old Latex don't work eg

\left[ \frac 1 c \right ]

If you look at the latex code, it is perfectly legal.

And as far as I can tell it works perfectly.
 
  • #193
yungman said:
A lot of the old Latex don't work eg

\left[ \frac 1 c \right ]

If you look at the latex code, it is perfectly legal.

It works with me (firefox), what browser are you using?
 
  • #194
Update.

I normally run XP with limited user privileges.

I just tried the admin account and bingo the errors don't appear.

However this suggests all those on corporate machines without the ability to access their admin account will struggle?
 
  • #195
Greg Bernhardt said:
ok we are now loading the config file locally. please report any performance changes
It still renders very slowly in IE8 because of the conditional.
 
  • #196
Sorry, I don't know what is supposed to work and what isn't. \copyright doesn't work.
 
  • #197
For me on IE and Chrome, the latex looks pixelated. I would like to have it nice and anti-aliased. Maybe an option to select either these latex fonts for rendering, or to have rendered vector images which can be generated as temporary images?
 
  • #198
Borek said:
This must be something with mathjax servers, when they are not fast enough, there are problems

The CDN is on Amazon Web Servers (The Cloud).

I've gotten word from the developers that a small update is coming shortly that should address some IE7 issues.
 
Last edited:
  • #199
Greg Bernhardt said:
The CDN is on Amazon Web Servers (The Cloud).

I know. And if I understand the situation correctly I am not sure the idea of loading some (quite large I guess) scripts each time I am visiting PF page sounds a little bit wasteful.

I've gotten word from the developers that a small update is coming shortly that should address some IE7 issues.

Hopefully they will also look at Opera, in most cases when I have problem opening pages at PF in Opera they open in Chrome and FF. This is always related to some problems contacting cdn.

Then, who uses Opera? Borek does...
 
  • #200
Borek said:
I know. And if I understand the situation correctly I am not sure the idea of loading some (quite large I guess) scripts each time I am visiting PF page sounds a little bit wasteful.

I might be mistaken but I thought the scripts were on a 24h cache.
Borek said:
Hopefully they will also look at Opera, in most cases when I have problem opening pages at PF in Opera they open in Chrome and FF. This is always related to some problems contacting cdn.

Then, who uses Opera? Borek does...

Do you have any other specific I can relay to them? Anything in Opera logs? btw, 2% of PF visitors use Opera :)
 

Similar threads

Replies
3
Views
4K
Replies
15
Views
25K
Replies
4
Views
4K
Replies
8
Views
2K
Replies
3
Views
2K
Replies
4
Views
4K
Replies
3
Views
2K
Replies
3
Views
13K
Back
Top