LaTeX Why are MathJax images not displaying on my webpage?

Click For 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.
  • #31
So, we can't click anymore to see the latex code? :(
 
Physics news on Phys.org
  • #32
Edit: NVM, this is wrong: "No; as a workaround you can quote the post to see the \LaTeX."

Edit: heh, that's funny, MathJax renders \LaTeX incorrectly. Wonder if it works in eq. mode:
<br /> \LaTeX<br />
 
  • #33
I scaled the equations by 20%. look better?
 
  • #34
QuarkCharmer said:
So, we can't click anymore to see the latex code? :(

Right click on the equation to get a menu.
 
  • #35
If the TeX is too small, you can manually scale it in the menu.
 
  • #36
Greg Bernhardt said:
Right click on the equation to get a menu.

Ah, View MathML Source. Thanks
 
  • #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 K = \frac{1}{2}mv^2, the ground observer will measure a kinetic energy of \frac{1}{2}m(v + V)^2, or
K + \sqrt{2Km}V + \frac{1}{2}mV^2
(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,"
K = E - mc^2
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,
\begin{pmatrix}E/c \\ p\end{pmatrix} = \begin{pmatrix}\gamma_v mc \\ \gamma_v mv\end{pmatrix}
where \gamma_v = 1/\sqrt{1 - v^2/c^2}. This four-vector transforms under the Lorentz transformation as you shift from one reference frame to another,
\begin{pmatrix}E/c \\ p\end{pmatrix}_\text{ground} = \begin{pmatrix}\gamma &amp; \gamma\beta \\ \gamma\beta &amp; \gamma\end{pmatrix}\begin{pmatrix}E/c \\ p\end{pmatrix}_\text{train}
(where \beta = V/c and \gamma = 1/\sqrt{1 - \beta^2}), so the energy as observed from the ground would be given by
E_\text{ground} = \gamma(E_\text{train} + \beta c p_\text{train})
The kinetic energy is obtained by subtracting mc^2 from the total energy, so you'd get
K_\text{ground} = \gamma(E_\text{train} + \beta c p_\text{train}) - mc^2
which works out to
K_\text{ground} = \gamma K_\text{train} + (\gamma - 1) mc^2 + \gamma\beta c p_\text{train}
where K is the relativistic kinetic energy and p is the relativistic momentum.

If you wanted it in terms of energy alone:
K_\text{ground} = \gamma K_\text{train} + (\gamma - 1) mc^2 + \gamma\beta\sqrt{K_\text{train}^2 + 2 mc^2 K_\text{train}}
You might start to notice a similarity to the non-relativistic expression above (K + \sqrt{2Km}V + \frac{1}{2}mV^2), and indeed, if you plug in some approximations that are valid at low speeds (\gamma \approx 1, \gamma - 1 \approx V^2/c^2, K_\text{train} \approx \frac{1}{2}mv^2 \ll mc^2), 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: 441
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: \not =
 
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: \epsilon\mathrm{,}\ \varepsilon\mathrm{,}\ \mu\mathrm{,}\ \upmu\mathrm{,}\ \mathbb{C}\mathrm{,}\ \mathtt{C}\mathrm{,}\ \mathsf{C}
 
  • #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.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 15 ·
Replies
15
Views
25K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
8
Views
4K
  • · Replies 17 ·
Replies
17
Views
4K
  • · Replies 3 ·
Replies
3
Views
13K