LaTeX Issue with Latex Equations: I have a screen recording of the problem

  • Thread starter Thread starter zenterix
  • Start date Start date
  • Tags Tags
    latex
AI Thread Summary
There is a recurring issue with LaTeX equations not rendering correctly in new forum threads due to MathJax only loading on pages with existing LaTeX. Users have reported that this bug affects the preview feature, making it difficult to see equations before posting. Suggestions have been made to load MathJax on all pages or implement a button to trigger its loading when LaTeX is detected. Performance concerns are noted, as most threads do not contain equations, making universal loading potentially inefficient. The community is seeking a solution, including the possibility of user-driven contributions to fix the issue.
zenterix
Messages
774
Reaction score
84
My posts all include many equations written in Latex. It seems to me like there are a few bugs related to usage of Latex specifically when just starting a new thread.

I've made a short 2 minute screen recording to show the issue I face every single time I want to start a new thread, and the way I get around it.

Since it doesn't seem possible to attach the video here, I have saved it to Google Drive https://drive.google.com/file/d/1ed7_oD8j66R62h6g0LYvqaBgizgY5Xj0/view?usp=sharing.

I think it's pretty clear what's happening there, though I would be shocked if this is happening to everyone because it's such an annoying bug that I would imagine it would have had to be brought up and solved by now.
 
Physics news on Phys.org
It's a known issue, I'm afraid. MathJax only loads on pages where there's already LaTeX. That means that new threads, and the first reply on a page to use LaTeX, don't get their maths rendered in preview. Yes, that is annoying.
 
Ibix said:
It's a known issue, I'm afraid. MathJax only loads on pages where there's already LaTeX. That means that new threads, and the first reply on a page to use LaTeX, don't get their maths rendered in preview. Yes, that is annoying.
Is it the case that someone has looked into it and there is no easy solution, or is it just an issue on the backburner?

If the latter, is it possible for a regular user to look into it and possibly create a pull request?
 
  • Like
Likes PeroK
Over the holiday I can look into loading the main MathJax script when the preview button is clicked.
 
  • Like
Likes George Keeling, Wrichik Basu, zenterix and 3 others
That would be great if it's possible, Greg, thanks.
 
  • Like
Likes zenterix
zenterix said:
Is it the case that someone has looked into it and there is no easy solution, or is it just an issue on the backburner?

If the latter, is it possible for a regular user to look into it and possibly create a pull request?
What I do is: copy the text so I don't lose it; hit the browser screen refresh; then hit the PF preview.
 
  • Informative
Likes berkeman and Ibix
PeroK said:
What I do is: copy the text so I don't lose it; hit the browser screen refresh; then hit the PF preview.
Well whaddaya know... Thanks. Doesn't seem to work quite right in the Post new thread screen, though. I just tried it and got the rendered LaTeX in the editor, which was not what I wanted.
 
  • Sad
Likes PeroK
Ibix said:
Well whaddaya know... Thanks. Doesn't seem to work quite right in the Post new thread screen, though. I just tried it and got the rendered LaTeX in the editor, which was not what I wanted.
This needs to be fixed.
 
  • Like
Likes zenterix and Ibix
  • #10
Ibix said:
It's a known issue, I'm afraid. MathJax only loads on pages where there's already LaTeX. That means that new threads, and the first reply on a page to use LaTeX, don't get their maths rendered in preview. Yes, that is annoying.
Is it possible to include LaTeX on every page of the forum (e.g. in the footer of the page) so that MathJax always loads or would this cause performance issues?
 
  • #11
Ygggdrasil said:
Is it possible to include LaTeX on every page of the forum (e.g. in the footer of the page) so that MathJax always loads or would this cause performance issues?
Performance is the factor. The library is quite large and the fact is most threads don't have equations.
 
  • Like
Likes Ygggdrasil and Ibix
  • #12
Another alternative (I had probably suggested this before) is to show a button in pages in which MathJax is not already loaded. Clicking the button should load the MathJax resource for that page.
 
  • Like
Likes PeroK
  • #13
Would it be possible for a script to search the page for any of the four tags for tex/itex and, if found, load MathJax? Would the search be quite fast?
 
  • #14
DrGreg said:
Would it be possible for a script to search the page for any of the four tags for tex/itex and, if found, load MathJax? Would the search be quite fast?
That is how it works currently, the preview function complicates that a little.
 
  • Like
Likes Wrichik Basu and DrGreg

Similar threads

Replies
9
Views
2K
Replies
3
Views
2K
Replies
4
Views
4K
Replies
3
Views
4K
Replies
3
Views
2K
Replies
2
Views
6K
Replies
2
Views
3K
Replies
4
Views
4K
Replies
2
Views
3K
Back
Top