Trying to write in LaTex and MathJax not picking up

  • Context: LaTeX 
  • Thread starter Thread starter giodude
  • Start date Start date
  • Tags Tags
    Latex Mathjax
Click For Summary
SUMMARY

The discussion addresses issues with LaTeX rendering in the Physics Forum, specifically that MathJax does not properly format LaTeX in preview mode. Users experience problems when posting new threads, as the LaTeX does not render unless it is present on the page initially. A workaround involves composing LaTeX in the reply box and then pasting it into the new thread editor. This bug leads to inline LaTeX being transformed into garbled text upon previewing or posting.

PREREQUISITES
  • Understanding of LaTeX syntax for mathematical expressions.
  • Familiarity with MathJax rendering engine.
  • Basic navigation of online forum platforms.
  • Knowledge of troubleshooting web-based text editors.
NEXT STEPS
  • Research "MathJax configuration settings" to optimize LaTeX rendering.
  • Explore "LaTeX best practices for online forums" to avoid common pitfalls.
  • Investigate "web-based text editor bugs" for potential fixes and workarounds.
  • Review "Physics Forum guidelines for posting LaTeX" to ensure compliance.
USEFUL FOR

Forum users, educators, and students who utilize LaTeX for mathematical content in online discussions, particularly those engaging with the Physics Forum.

giodude
Messages
30
Reaction score
1
I'm attempting to use latex to write a question in the physics forum. However, when I click preview to check if the formatting is correct it doesn't reformat to display in its latex form, rather it stays in plain text. Any suggestions on what I may be doing wrong?

I've posted the screenshots of before and after clicking preview below.
 

Attachments

  • Screen Shot 2023-10-03 at 9.17.26 PM.png
    Screen Shot 2023-10-03 at 9.17.26 PM.png
    12.3 KB · Views: 104
  • Screen Shot 2023-10-03 at 9.17.38 PM.png
    Screen Shot 2023-10-03 at 9.17.38 PM.png
    11.9 KB · Views: 149
Physics news on Phys.org
Reloaded the page and seems to have been fixed now.
 
  • Like
Likes   Reactions: berkeman
It's a known bug that seems to be hard to fix.

The parser doesn't load on a page update (like when you reply to a thread), only on the initial load. So if there isn't already LaTeX on a page it doesn't render in a new post. Refresh the page to render.

Likewise, it doesn't work in reply preview unless there's already LaTeX. You can fix this by writing some LaTeX, going into preview, and then refreshing (it's a good idea to take a copy of your text first, just in case...).

LaTeX doesn't work at all in the new thread editor. My advice is to compose an opening post in the reply box of a thread with LaTeX, then paste it into the new thread start when you're happy.
 
Last edited:
  • Like
Likes   Reactions: mfb, berkeman and giodude
The bug is actually worse than LaTeX not rendering. After writing some LaTeX, when you refresh the page, inline LaTeX will be rendered in the text editor itself. The moment you click Preview or Post Thread, the rendered LaTeX will be transformed into garbled text. You won't have the source code anymore.

A list of threads reporting the same issue is available here: https://www.physicsforums.com/threa...equation-rendering-issue.1046932/post-6816969

A workaround is mentioned here: https://www.physicsforums.com/threa...iew-on-this-forum-please.1050518/post-6862199
 
  • Informative
  • Like
Likes   Reactions: mfb and berkeman

Similar threads

  • · Replies 11 ·
Replies
11
Views
847
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 8 ·
Replies
8
Views
14K
  • · Replies 2 ·
Replies
2
Views
3K