Latex not working under preview

  • LaTeX
  • Thread starter PainterGuy
  • Start date
In summary, the issue with Latex compiling is that it doesn't convert into Latex graphic when previewed. There is a workaround that is known but hasn't been fixed.
  • #1
PainterGuy
940
69
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.

[tex]x[/tex]
[tex]x[\tex]
$x$
$$x$$

The image below shows PREVIEW window.

1646109391946.png


PS: It works when I posted the message.

EDIT: I checked it on Chrome and it's working there.
 
Last edited:
Physics news on Phys.org
  • #2
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
 
  • #3
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 [itex]...[/itex]. Or, perhaps PF could use both $...$ and [itex]...[/itex].
 
  • #4
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 PainterGuy
  • #5
mfb said:
You can use ## for inline TeX.
Just wondering why $...$ syntax cannot used. Isn't it more standard? Thanks!
 
  • #6
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 PainterGuy
  • #7
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 Wrichik Basu, mfb, Nugatory and 1 other person
  • #8
I'm assuming there has been no action on this bug from administration?
 
  • #9
That;s right! They should hop to it! Why, with what we're paying them...
 
  • Like
  • Haha
  • Skeptical
Likes 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 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 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 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 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 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 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 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 Wrichik Basu

Related to Latex not working under preview

1. Why is my Latex not showing up under preview?

There could be several reasons for this issue. One common reason is that the Latex code is not properly formatted or contains errors. Another reason could be that the preview settings are not configured correctly. It is also possible that the preview software does not support the Latex package you are using.

2. How do I fix Latex not working under preview?

To fix this issue, first check if there are any errors in your Latex code. Make sure the code is properly formatted and all necessary packages are included. If the issue persists, try changing the preview settings or using a different preview software that supports the Latex package you are using.

3. Is there a specific format for writing Latex code for preview?

Yes, there are certain formatting guidelines for writing Latex code for preview. The code should be enclosed in dollar signs ($$) and the necessary packages should be included in the preamble. Additionally, make sure there are no spelling or syntax errors in the code.

4. Can I use any Latex package for preview?

No, not all Latex packages are supported by preview software. It is best to check the documentation of the preview software to see which packages are supported. If a specific package is not supported, you may need to find an alternative or use a different preview software.

5. Are there any troubleshooting steps for Latex not working under preview?

Yes, there are a few troubleshooting steps you can try if Latex is not working under preview. First, make sure your Latex code is error-free and properly formatted. Then, check the preview settings and make sure they are configured correctly. If the issue persists, try using a different preview software or updating your current software to the latest version.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
871
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
826
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
953
Back
Top