Why are MathJax images not displaying on my webpage?

In summary: Images are more bandwidth intensive.In summary, the MathJax environment changed and there are no Latex images being displayed. Please post any problems. I'll leave it enabled for the next hour or so and switch back to images until we are 100% ready.
  • #36
Greg Bernhardt said:
Right click on the equation to get a menu.

Ah, View MathML Source. Thanks
 
Physics news on Phys.org
  • #37
It works in PMs and the old system did not. I think it's an improvement. Good move.

Are all the math symbols available ?
 
  • #38
Hm, let me try repeating something I posted on another site as a real-world test:
However, you can _convert_ an amount of kinetic energy measured in one frame to another frame, if you know their relative velocity. If you're working at low speeds, the easy (approximate) way to do this is to just calculate the relative velocity, as you did. So if the train observer measures a kinetic energy [itex]K = \frac{1}{2}mv^2[/itex], the ground observer will measure a kinetic energy of [itex]\frac{1}{2}m(v + V)^2[/itex], or
[tex]K + \sqrt{2Km}V + \frac{1}{2}mV^2[/tex]
(in one dimension).

If you get up to higher speeds, or you want an exact expression, you'll have to use the relativistic definition of energy. In special relativity, the kinetic energy is given by the difference between the total energy and the "rest energy,"
[tex]K = E - mc^2[/tex]
One way to figure out the transformation rule is to use the fact that the total energy is part of a four-vector, along with the relativistic momentum,
[tex]\begin{pmatrix}E/c \\ p\end{pmatrix} = \begin{pmatrix}\gamma_v mc \\ \gamma_v mv\end{pmatrix}[/tex]
where [itex]\gamma_v = 1/\sqrt{1 - v^2/c^2}[/itex]. This four-vector transforms under the Lorentz transformation as you shift from one reference frame to another,
[tex]\begin{pmatrix}E/c \\ p\end{pmatrix}_\text{ground} = \begin{pmatrix}\gamma & \gamma\beta \\ \gamma\beta & \gamma\end{pmatrix}\begin{pmatrix}E/c \\ p\end{pmatrix}_\text{train}[/tex]
(where [itex]\beta = V/c[/itex] and [itex]\gamma = 1/\sqrt{1 - \beta^2}[/itex]), so the energy as observed from the ground would be given by
[tex]E_\text{ground} = \gamma(E_\text{train} + \beta c p_\text{train})[/tex]
The kinetic energy is obtained by subtracting [itex]mc^2[/itex] from the total energy, so you'd get
[tex]K_\text{ground} = \gamma(E_\text{train} + \beta c p_\text{train}) - mc^2[/tex]
which works out to
[tex]K_\text{ground} = \gamma K_\text{train} + (\gamma - 1) mc^2 + \gamma\beta c p_\text{train}[/tex]
where [itex]K[/itex] is the relativistic kinetic energy and [itex]p[/itex] is the relativistic momentum.

If you wanted it in terms of energy alone:
[tex]K_\text{ground} = \gamma K_\text{train} + (\gamma - 1) mc^2 + \gamma\beta\sqrt{K_\text{train}^2 + 2 mc^2 K_\text{train}}[/tex]
You might start to notice a similarity to the non-relativistic expression above ([itex]K + \sqrt{2Km}V + \frac{1}{2}mV^2[/itex]), and indeed, if you plug in some approximations that are valid at low speeds ([itex]\gamma \approx 1[/itex], [itex]\gamma - 1 \approx V^2/c^2[/itex], [itex]K_\text{train} \approx \frac{1}{2}mv^2 \ll mc^2[/itex]), you will recover exactly that expression.
I'm seeing some pretty serious problems in the post preview on Firefox 4: large chunks of the post text just don't show up. It doesn't seem to be a problem with the HTML or MathML markup, but rather with the way the browser's rendering engine interacts with it, because if I scroll down far enough to put the preview out of view and then back up, it'll look different. Plus, I can select sections of text to make them show up, but then other sections of the preview (and even of the page, outside of the preview) flicker in and out of view as I change the selection. A lot of the problem areas seem to start at instances of the / operator in the math, so perhaps the way that's being rendered is messing things up somehow. I suppose this could be a problem with MathJax itself, but I've been to several other sites that use it and never had this problem before (including the site where I originally posted the exact same thing I quoted), so there must be something specific to PF that is contributing to this problem somehow. (A sample screenshot attached - notice how part of the second matrix equation is cut off, as well as most of the lines above and below it. At other times multiple entire paragraphs would be missing.)

Although it's not as big of an issue, the block equations have a bit too much space above and (especially) below them. Also, the font size is noticeably too small, though not by much. If it's possible to use a larger font size for the block equations than the inline ones, I think that would make the post look better overall.
 

Attachments

  • pfpreviewbug1.png
    pfpreviewbug1.png
    8.4 KB · Views: 378
Last edited:
  • #39
I'll leave MathJax up for another hour and then back to images. thanks for all the feedback! dianoza i'll forward the post to the developers. FF4 just came out so I bet they are working to get it compatible.
 
  • #40
...and I'm now seeing the same rendering errors (missing chunks of text) when looking at the post itself - this is after posting, not in preview mode anymore.
 
  • #41
diazona said:
...I'm seeing some pretty serious problems in the post preview on Firefox 4...

I can confirm this on Firefox 4, Linux x86_64 2.6.37.6-0.5
 
  • #42
It works in Konqueror with KHTML. Konqi with WebKit is slow, it hangs on fondtata.js for me. Could just be a side effect of running a Windows 7 VM in the background.

Test: [itex]\not =[/itex]
 
Last edited:
  • #43
Greg, are we on MathJax 1.1? Edit: dumb question, you're linking to their CDN.

A bit of Googling suggests that there exist rendering problems with FF 4.*.
 
Last edited:
  • #44
jhae2.718 said:
Greg, are we on MathJax 1.1? Edit: dumb question, you're linking to their CDN.

A bit of Googling suggests that there exist rendering problems with FF 4.*.

thanks I'll look into it more tomorrow. for now the images are back. thanks again for all the feedback!
 
  • #45
jhae2.718 said:
Greg, are we on MathJax 1.1? Edit: dumb question, you're linking to their CDN.

A bit of Googling suggests that there exist rendering problems with FF 4.*.
Hm... the site I took my example from also uses MathJax 1.1:
MathJax v1.1
using local STIX fonts

TeX Input Jax v1.1
HTML-CSS Output Jax v1.1
mml Element Jax v1.1
tex2jax Extension v1.1
MathZoom Extension v1.1
MathMenu Extension v1.1
TeX/noErrors Extension v1.0.1
TeX/noUndefined Extension v1.0.1
Firefox v4.0
but there are no rendering errors.
 
  • #46
I'm wondering if the the "Zoom Function" on Firefox 4.0 might be the culprit here. I haven't did any research however since I'm ready for bed with several crafted beers in me. :)

Anyway, I'm all for unloading the server which will be an asset to PF. Thanks for your work Greg.
 
  • #48
Pages with any appreciable amount of LaTeX take a lot longer to load, it seems. For example, this page took about 15 - 20 sec. to load.
 
  • #49
Not having any problems with Diazona's post anymore.
 
  • #50
Mark44 said:
Pages with any appreciable amount of LaTeX take a lot longer to load, it seems. For example, this page took about 15 - 20 sec. to load.

What browser are you using? I would think in a current version of FF or Chrome that the JS processing would be slightly faster than downloading images.
 
  • #52
I don't remember why there are \textrm here, that's just copy/pasted from somewhere else. Where does the red come from?
 
Last edited by a moderator:
  • #53
Looks like any error in the code shows up as red. That's neat, and nicer than the "cannot render" box before.

Test: [itex]\epsilon\mathrm{,}\ \varepsilon\mathrm{,}\ \mu\mathrm{,}\ \upmu\mathrm{,}\ \mathbb{C}\mathrm{,}\ \mathtt{C}\mathrm{,}\ \mathsf{C}[/itex]
 
  • #54
I think the new system is taking more time to render, although that must be because it is still undergoing testing.
 
  • #55
Borek said:
I don't remember why there are \textrm here, that's just copy/pasted from somewhere else. Where does the red come from?

Try putting a space between the \textrm's where there is red; I fixed the markup in the quote. Not sure why it works that way; it should work as is, but maybe it's something to do with the MathJax interpreter.
 
Last edited by a moderator:
  • #56
Sorry if this is known already, but this LaTeX output doesn't work on the mobile version of the site. At least, that's true when running the Safari app in iOS 4. All I see is the LaTeX source code instead.
 
  • #57
cepheid said:
Sorry if this is known already, but this LaTeX output doesn't work on the mobile version of the site. At least, that's true when running the Safari app in iOS 4. All I see is the LaTeX source code instead.

I see LaTeX fine on iOS 4.3. Posted from my iPad.
 
  • #58
Greg Bernhardt said:
What browser are you using? I would think in a current version of FF or Chrome that the JS processing would be slightly faster than downloading images.
Sorry, I meant to include that info but forgot. I'm using IE 8.

I see small status boxes in the lower left corner that say things like Processing math 38%, and loading some font.
 
  • #59
Mark44 said:
...I'm using IE 8...

You should use a better browser. :wink:
 
  • #60
flyingpig said:
Please don't fix what's not broken!
Nebuchadnezza said:
Why the sudden change?
You guys should search the feedback forum for threads with the word "latex" in the title. The LaTeX feature is definitely broken, and the change isn't at all sudden. LaTeX previews haven't worked properly for more than a year. I think there are at least 30 threads about it. The move to MathJax has been discussed in public at least since February. The admins probably started talking about it long before that.

flyingpig said:
Sorry to say I really hate the new look. The images are smaller, and arew just ugly compared to the old font. Please bring back imgtex =)
Give the admins some time to work things out. If it still looks ugly when they say that they're done, then you can start whining about it.

jhae2.718 said:
Not having any problems with Diazona's post anymore.
It's still completely messed up for me. I assume we're talking about #38. It looks fine until I put my mouse pointer over a math expression, and then stuff disappears, including plain text below the quote box.
 
  • #61
Yes, #38. What browser/platform are you on?
 
  • #62
jhae2.718 said:
I see LaTeX fine on iOS 4.3. Posted from my iPad.

Hmm, yes, but are you looking at the full or the mobile version of the site? I'm looking at the mobile version. I think my iOS version is 4.2.1, and I'm running it on an iPhone 3G.
 
  • #63
I'm using Firefox 4.0.1 on Windows 7 SP1.

This is a post I wrote some time ago that contains a lot of math. I'm having similar problems with that. Another weird thing is that that link should automatically scroll to post #13, but for some reason that doesn't quite work.

One of the math expressions in that post doesn't show up at all. I don't see anything wrong with the latex code when I click quote, but mathjax displays it as if I had typed "\rang le" instead of "\rangle". This is the second line with only math after the line that starts with the word "Define".

I just tried Internet Explorer. With IE, I don't have the problem that stuff disappears when I put my mouse pointer over a math expression, but that specific line I mentioned is still messed up. Hm, maybe I don't have matching tex and itex tags...I'll check. IE also fails to scroll down to post #13.

Edit: No, I don't see any problems with the tex/itex tags. This is the line that MathJax doesn't seem to understand:

[tex]\phi(x)=\left\langle\frac{z}{\|z\|^2},x\right\rangle[/tex]

Code:
\phi(x)=\left\langle\frac{z}{\|z\|^2},x\right\rangle
 
Last edited:
  • #64
Fredrik said:
I'm using Firefox 4.0.1 on Windows 7 SP1.

This is a post I wrote some time ago that contains a lot of math. I'm having similar problems with that. Another weird thing is that that link should automatically scroll to post #13, but for some reason that doesn't quite work.

I'm using Chrome 12 and all the math on that page appears to render fine. I'll test with FF 4.0.1
 
  • #65
I'm having similar problems in Frederik's posts. I'm also using firefox, by the way...
 
  • #66
cepheid said:
Hmm, yes, but are you looking at the full or the mobile version of the site? I'm looking at the mobile version. I think my iOS version is 4.2.1, and I'm running it on an iPhone 3G.

Full version.

Fredrik said:
I'm using Firefox 4.0.1 on Windows 7 SP1.

I have no problems with Firefox 4.0.1 on Linux.

Fredrik said:
[tex]\phi(x)=\left \langle \frac{z}{\|z\|^2}, x \right \rangle[/tex] (jhae2.718: I've modified the TeX markup to the left)

Code:
\phi(x)=\left\langle\frac{z}{\|z\|^2},x\right\rangle

I've noticed the parser doesn't alway recognize things. Try putting spaces between commands, as I did in the quoted text above. The spacing on the displayed code is an artifact of vBulletin.
 
  • #67
micromass said:
I'm having similar problems in Frederik's posts. I'm also using firefox, by the way...

hmm using Win7 FF 4.0.1 fred's post looks fine except for the one equation he mentioned
 
  • #68
Try installing the STIX fonts locally. I'll bet that both Greg and I have those, which is why we don't have problems.
 
  • #69
jhae2.718 said:
Try installing the STIX fonts locally. I'll bet that both Greg and I have those, which is why we don't have problems.

Shouldn't have to do this, they are loaded from the mathjax server.
 
  • #70
While correlation [itex]\not =[/itex] causation, I stopped having those problems after I installed the fonts. It's possible that there is some problem with the way FF4 treats the fontdata.js or the fonts when loaded from the server.

Let me try with FF4 in my W7 VM (which doesn't have the STIX fonts) and get back to you.
 

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
15
Views
25K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
272
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
  • Programming and Computer Science
Replies
1
Views
1K
  • Feedback and Announcements
Replies
17
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
Back
Top