Latex not working under preview

  • Context: LaTeX 
  • Thread starter Thread starter PainterGuy
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around issues with LaTeX rendering in the preview feature of Physics Forums, particularly focusing on its functionality across different browsers and the syntax used for inline LaTeX. Participants explore the technical aspects of the preview feature, user experiences, and potential improvements.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Meta-discussion

Main Points Raised

  • Some participants report that LaTeX does not compile correctly in the preview mode, particularly in Opera and Chrome browsers.
  • Others note that LaTeX rendering works correctly once a message is posted, indicating a potential bug in the preview function.
  • There is a suggestion that Physics Forums should adopt the $...$ syntax for inline LaTeX, which some participants consider more standard.
  • Some participants mention that the preview feature does not load MathJax unless it has been previously called in the thread, which is identified as a known issue.
  • A participant shares a workaround involving reloading the page to get LaTeX to render properly in the preview.
  • Concerns are raised about the lack of administrative response to the ongoing issues with LaTeX rendering, with some expressing frustration over perceived delays in addressing the bug.
  • There is a discussion about the complexity of fixing the bug due to the involvement of external packages and the implications of lazy loading MathJax.
  • Some participants express confusion and frustration regarding the community's reactions to their inquiries about the issue.
  • Participants discuss the possibility of escaping the $...$ syntax to avoid confusion in certain contexts.

Areas of Agreement / Disagreement

Participants generally agree that there are issues with LaTeX rendering in the preview feature, but there are multiple competing views regarding the syntax and the effectiveness of proposed workarounds. The discussion remains unresolved regarding the best approach to address the rendering issues.

Contextual Notes

Limitations include the dependence on browser behavior, the specific configurations of LaTeX rendering on Physics Forums, and the unresolved nature of the bug affecting the preview function.

PainterGuy
Messages
938
Reaction score
73
Hi,

Is Latex compiling broken under preview? The code doesn't convert into Latex graphic when I try to preview. Not sure if it would work when I post this message. I have purposely used different combinations below.

I'm using Windows 11 and Opera browser.

x
x[\tex]<br /> $x$<br /> $$x$$<br /> <br /> The image below shows PREVIEW window.<br /> <br /> <script class="js-extraPhrases" type="application/json"> { "lightbox_close": "Close", "lightbox_next": "Next", "lightbox_previous": "Previous", "lightbox_error": "The requested content cannot be loaded. Please try again later.", "lightbox_start_slideshow": "Start slideshow", "lightbox_stop_slideshow": "Stop slideshow", "lightbox_full_screen": "Full screen", "lightbox_thumbnails": "Thumbnails", "lightbox_download": "Download", "lightbox_share": "Share", "lightbox_zoom": "Zoom", "lightbox_new_window": "New window", "lightbox_toggle_sidebar": "Toggle sidebar" } </script> <div class="bbImageWrapper js-lbImage" title="1646109391946.png" data-src="https://www.physicsforums.com/attachments/1646109391946-png.297725/" data-lb-sidebar-href="" data-lb-caption-extra-html="" data-single-image="1"> <img src="https://www.physicsforums.com/attachments/1646109391946-png.297725/" data-url="" class="bbImage" data-zoom-target="1" style="" alt="1646109391946.png" title="1646109391946.png" width="800" height="152" loading="lazy" decoding="async" /> </div><br /> <br /> PS: It works when I posted the message.<br /> <br /> EDIT: I checked it on Chrome and it&#039;s working there.
 
Last edited:
Physics news on Phys.org
There is definitely some problem with PREVIEW because even on Chrome it showed Latex correctly once when I previewed it but then it stopped working and the Latex code didn't even appear under PREVIEW.Original draft in Chrome
1646110840396.png

Under PREVIEW in Chrome - Latex code disappeared
1646110874456.png
 
Also, is there any chance that PhysicsForums would start using $...$ syntax for inline Latex?

IMHO, $...$ is more standard for the inline Latex. I think PhysicsForums uses .... Or, perhaps PF could use both $...$ and ....
 
You can use ## for inline TeX.

The preview doesn't load MathJax unless it's already being called for a previous formula in the thread, that's a known bug. Checking the preview function in a thread that has formulas should be fine. If you want to start a thread with many formulas you could test it using the preview function in an existing thread with formulas.
 
  • Like
Likes   Reactions: PainterGuy
mfb said:
You can use ## for inline TeX.
Just wondering why $...$ syntax cannot used. Isn't it more standard? Thanks!
 
I usually need to select preview and the reload the page the first time to get it to render (Chrome, Win10). It's not a big deal once I figured that out.
 
  • Like
Likes   Reactions: PainterGuy
PainterGuy said:
Just wondering why $...$ syntax cannot used. Isn't it more standard? Thanks!
It's a very annoying syntax if you say something's normally $10 but you only paid $5 for it. You don't often mention cash in a technical paper, but it's much more common on a forum.
 
  • Like
Likes   Reactions: Wrichik Basu, mfb, Nugatory and 1 other person
I'm assuming there has been no action on this bug from administration?
 
That;s right! They should hop to it! Why, with what we're paying them...
 
  • Like
  • Haha
  • Skeptical
Likes   Reactions: dextercioby, erobz, anorlunda and 1 other person
  • #10
Vanadium 50 said:
That;s right! They should hop to it! Why, with what we're paying them...
To be fair, I asked because it is an annoyance, and the thread was started over two months ago! I didn't say they had to go "we are fixing it right away sir!", but a simple acknowledgment of the feedback in the "feedback forums" is not a stupendous undertaking...I suppose I'm still all starry eyed from the whole "Gold member" perks speal, where I donated for something that I didn't have to pay for at all. I'd gladly donate that every year...If administration actually responded to reasonable criticisms in a timely manner. This is obviously a well-run forum, which is why the lack of a response is confusing.
 
Last edited:
  • #11
It's difficult to fix, it's related to the way an external package works, and there is a useful workaround.
All that information has been in the thread within two hours of its creation.
 
  • #12
erobz said:
Gold member" perks speal, where I donated for something that I didn't have to pay for at all.
This is why it is called a donation. Donations are given without return consideration.

/
 
  • Like
Likes   Reactions: Vanadium 50
  • #13
I asked a simple question. The info about the bug being "difficult to fix" was not in the thread.

I got a snarky reply:

Vanadium 50 said:
That;s right! They should hop to it! Why, with what we're paying them...

So I replied back with snark.

When I made a reply to defend a poster about someone else's snark I got a "warning" for being less than civil. Now you ( hutchphd) are being snarky, Vanadium was snarky. I get it, there is apparently a club and I'm not in it...
 
Last edited:
  • #14
Yes that is why we (in the club) try to avoid initial snark... snarks proliferate.
 
  • Informative
Likes   Reactions: erobz
  • #15
And when snarked at…. Please don’t counter-snark, it nearly always turns something that we mentors could have handled with a few mouse clicks into a bigger problem. Better to report it if it’s outside the range of normal civil disagreement.
 
  • Like
Likes   Reactions: Wrichik Basu and hutchphd
  • #16
erobz said:
The info about the bug being "difficult to fix" was not in the thread.
I didn't write it explicitly, but as soon as you have external tools involved things get more complicated. Is it a bug on your side? On their side? Is it a bug in how the two work together? Most likely it's the last option.

If it were easy to fix then it would have been fixed long ago.
 
  • #17
mfb said:
If it were easy to fix then it would have been fixed long ago.

I see that now. But I didn't see the long history of "Latex not working in preview" threads prior to posting it.

I'm new to these forums, and people are getting all bent out of shape about me even asking "what's the deal". I feel as though I've stepped on a hive of ground bees! Half of a dozen or more posts on this thread have been removed...attacks for asking a question "in the site feedback thread" are ridiculous.

But thank you for clarifying the issue.
 
Last edited:
  • #18
It's also worth noting that the current situation is partially in response to earlier issues, IIRC. MathJax used to be loaded on every page but it made loading slow. So it was switched to a lazy load that only loaded MathJax on pages with LaTeX. But that led to a bug where LaTeX would sometimes randomly render in your edit box because somebody posted something with LaTeX while you were typing, or you accidentally hovered over a thread link whose preview included LaTeX, and then your nicely formatted maths came out as a random collection of symbols. So now we have the current situation where it lazy loads not quite always when it's needed.

MathJax interoperability isn't high on the priority list of anyone in the forum software world outside here, I'm afraid.
 
  • Like
Likes   Reactions: mfb
  • #19
Ibix said:
It's a very annoying syntax if you say something's normally $10 but you only paid $5 for it. You don't often mention cash in a technical paper, but it's much more common on a forum.
Isn't it possible to escape it; with an \ or otherwise?
 
  • Like
Likes   Reactions: malawi_glenn
  • #20
WWGD said:
Isn't it possible to escape it; with an \ or otherwise?
Let's try: "something's normally \$10 but I only paid \$5 for it" renders as "something's normally \$10 but I only paid \$5 for it".

Looks good. Note that this has only become necessary since adoption of the MHB $\LaTeX$ delimiters.
 
  • Like
Likes   Reactions: WWGD
  • #21
pbuk said:
Note that this has only become necessary since adoption of the MHB $\LaTeX$ delimiters.
It hasn't become necessary as PF is running a different config for threads which have the MHB prefix. We can continue to use $10 and $5 without any backslash. In your post, the word ##\LaTeX## hasn't been rendered. Screenshot:

1660728092703.png
 
  • #22
I think you need to flush your browser cache (shift reload) - this is how your post renders to me.

1660729071383.png
 
  • #23
pbuk said:
I think you need to flush your browser cache (shift reload) - this is how your post renders to me.

View attachment 312882
Did that, and it still renders fine for me.
 
  • Like
Likes   Reactions: pbuk
  • #24
Wrichik Basu said:
Did that, and it still renders fine for me.
Haha, it was ME that needed to do the cache flush! I didn't realize Greg had added the MHB thread test (and had even said so, but I misunderstood!)
 
Last edited:
  • Like
Likes   Reactions: Wrichik Basu

Similar threads

  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 70 ·
3
Replies
70
Views
6K
  • · Replies 11 ·
Replies
11
Views
992
  • · Replies 4 ·
Replies
4
Views
4K