Is LaTeX Preview Working Properly?

  • Context: LaTeX 
  • Thread starter Thread starter chroot
  • Start date Start date
  • Tags Tags
    Latex
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
76 replies · 20K views
Physics news on Phys.org
Aren't images which are used more than once generated once? For example, if I type [itex]\lambda[/itex] once and then [itex]\lambda[/itex] again, it generates, stores and inserts two separate images?

[edit]Apparently it does... that's weird[/edit]
 
Fredrik said:
That's definitely not the problem I have. It fails every time, no matter what browser or computer(!) I use. I never had those intermittent problems that you have described before. (At least I think it was you, but I may remember it wrong).

I'm not sure if my description was completely accurate either, just going from memory of something that was posted last summer.

A work-around might be to write "editing in progress" at the top of a post, then submit it. Proofread, edit, and save as needed. When you're done, remove the "editing in progress" sign.

I've been frustrated with LaTex often enough that I try to avoid it. Not really possible all the time (such as in the post you linked to) though.

CompuChip said:
Aren't images which are used more than once generated once? For example, if I type https://www.physicsforums.com/latex_images/21/2192470-0.png once and then https://www.physicsforums.com/latex_images/21/2192470-1.png again, it generates, stores and inserts two separate images?

[edit]Apparently it does... that's weird[/edit]

Yup, those are two separate images with different URL's:
https://www.physicsforums.com/latex_images/21/2192470-0.png
and
https://www.physicsforums.com/latex_images/21/2192470-1.png
 
Last edited by a moderator:
Redbelly98 said:
A work-around might be to write "editing in progress" at the top of a post, then submit it. Proofread, edit, and save as needed. When you're done, remove the "editing in progress" sign.

I've been frustrated with LaTex often enough that I try to avoid it. Not really possible all the time (such as in the post you linked to) though.
Most of my posts are like that, so avoiding LaTeX isn't really an option for me. The "editing in progress" trick is only good enough for posts that have very little LaTeX content. So if this problem can't be solved, I would either have to get a new account or stop posting.

I'm writing this on a fourth computer, and I still get the same images when I preview. It's not the latest images or anything like that, but always the images from the post I linked to. I just did some more testing and noticed that if I put more than 15 LaTeX images in my post, only the first 15 are messed up in the preview. The 16th is displayed fine. Maybe I'll use that as a workaround for a while. :smile:
 
Fredrik said:
Most of my posts are like that, so avoiding LaTeX isn't really an option for me. The "editing in progress" trick is only good enough for posts that have very little LaTeX content. So if this problem can't be solved, I would either have to get a new account or stop posting.

I'm writing this on a fourth computer, and I still get the same images when I preview. It's not the latest images or anything like that, but always the images from the post I linked to. I just did some more testing and noticed that if I put more than 15 LaTeX images in my post, only the first 15 are messed up in the preview. The 16th is displayed fine. Maybe I'll use that as a workaround for a while. :smile:

I'm having exactly the same problem as Fredrik, except for me the number is not 15 but 2. Always. And the 2 corrupted images I see are always the same images every time. They are two equations that I once generated some time ago (probably the first Latex I created after it got reenabled after the disk problems).

I suspect that something went wrong in the past, some images got cached (on the server) in such a way that the cached images take precedence over freshly generated Latex in previews. Different users have a different number of "badly cached" images. For me it's 2, for Fredrik it's 15, for many lucky souls it's zero.

So a workaround is to stick a load of dummy latex images at the top of your post while previewing, remembering to delete them again before posting.
 
Okay guys, I added a bit of code that actively deletes stale preview images before generating new ones. That hopefully means the images will no longer be cached (by any entity -- our server, intervening proxy servers, or the browsers themselves).

Let me know if anything changes for you. Since some of you have this problem no matter what computer you use, etc., I'm worried there's actually a caching proxy server upstream of you, even if it's usually transparent.

- Warren
 
chroot said:
Okay guys, I added a bit of code that actively deletes stale preview images before generating new ones. That hopefully means the images will no longer be cached (by any entity -- our server, intervening proxy servers, or the browsers themselves).

Let me know if anything changes for you. Since some of you have this problem no matter what computer you use, etc., I'm worried there's actually a caching proxy server upstream of you, even if it's usually transparent.

- Warren
The problem seems to be fixed, for me at least. Thank you!
 
Fredrik said:
I just noticed another problem. Maybe it's only when I preview. I'll have to post this to find out. If I write f'(x), it appears as f single − quote(x).

[tex]f'(x)[/tex]

Nope, it looks fine when I post it.

Fredrik,

Fixed that one too. All should be well in LaTeX-land now.

- Warren
 
mattmns said:
[tex]2 + 2 = 4[/tex]
[tex]2 + 2 = 5[/tex] :smile:
 
[tex]\sum(A+BX_{i}-Y_{i})^2=0[/tex]

[tex]\mbox{just practising}[/tex]
 
Last edited:
I've just given up on trying to post an answer because in preview all of my Latex stuff is showing images from a previous post ages ago and refuses to show the stuff I've entered today. I've cleared the browser cache and restarted it before trying again and that didn't help. What else can I try? For example, the following expression is displaying in preview as v2/r which I used in a post some weeks ago:

[tex] \frac{d\mathbf{p}}{dt} = \frac{E}{c^2} \mathbf{g} \left ( 1 + \frac{v^2}{c^2} \right )[/tex]

Edit: When I submitted this one, the LaTeX now appears as a broken image marker.
 
There's an ongoing problem with LaTeX used in blogs and PMs. The image files in this case have "preview" URL, and you often get the wrong image. The problem is described also in thread [post=2590434]TEX broken?[/post].

I've just checked and the problem is still there.
 
I'm not sure if you posted that to report a problem, or if it was a reply to me. I'm aware of the need to click reply and preview, to get the LaTeX to look OK when you receive a PM. But that's not what I was talking about. I've been making a bunch of posts today, and every time, the LaTeX is messed up when I preview. (Older images are displayed). It doesn't help to just click preview again. I have to click my browser's refresh button, and then the resend button that shows up. And if I make any little change, I have to repeat the procedure.
 
Latex preview is working fine for me, but I see old images for latex in private messages and profile visitor messages.
 
For the first time in more than a year, latex preview doesn't work. It shows old images though I typed new equations. I hope that when I push "Submit reply" the true images will show up. :smile:
 
fluidistic said:
For the first time in more than a year, latex preview doesn't work. It shows old images though I typed new equations. I hope that when I push "Submit reply" the true images will show up. :smile:
I'm glad it's not just me. I had that problem yesterday and the day before. Let's see if I still have it today...[tex]x[/tex], [tex]w[/tex], [tex]z[/tex]. Yes, I do. (I wrote "x,y" and previewed, then I changed it to "x,w,z" and previewed again. The w shows up as y in the preview).

Edit: Trying again, after logging out and back in again. Uh...I still see a y.
 
LaTeX doesn't work in RSS feeds. I think this is by design though...
 
[tex]This is a test[/tex]

[tex]This is only a test[/tex]

Preview is not working for me, still getting old images.
 
NOTE: This is not about preview or latex in PMs/VMs etc.

Inline latex seems to be somewhat broken:

[ tex ]\dot \theta[ /tex ] = [tex]\dot \theta[/tex]

[ itex ]\dot \theta [ /itex ] = [itex]\dot \theta[/itex]

However, [ itex ]\dot x \dot k[ /itex ] = [itex]\dot x \dot k[/itex]

So it seems that with inline tex things like superscripts, dots, overlines, hats, and vector symbols do not show up over tall characters (like theta or k), but work for short characters (like x). This didn't happen before.
 
Last edited:
That problem has been around for a long time Gokul, but since you're retired staff with over 10K posts, I guess you've been here much longer than that. Another problem with itex (example: [itex]\mathbb R[/itex]) is that it changes the distance to the next line. You would often get better results with tex tags actually. And I'll just type a few more words to make sure that there's at least one line of text below the math expression.
 
Gokul43201 said:
NOTE: This is not about preview or latex in PMs/VMs etc.

Inline latex seems to be somewhat broken:

[ tex ]\dot \theta[ /tex ] = [tex]\dot \theta[/tex]

[ itex ]\dot \theta [ /itex ] = [itex]\dot \theta[/itex]

However, [ itex ]\dot x \dot k[ /itex ] = [itex]\dot x \dot k[/itex]

So it seems that with inline tex things like superscripts, dots, overlines, hats, and vector symbols do not show up over tall characters (like theta or k), but work for short characters (like x). This didn't happen before.
It seems that the top row of pixels is missing in itex.

[noparse][itex]\sqrt{X}[/itex][/noparse] = [itex]\sqrt{X}[/itex]
[noparse][tex]\sqrt{X}[/tex][/noparse] = [tex]\sqrt{X}[/tex]

(By the way, this message didn't preview correctly either, the same image was displayed for both the tex and itex.)

EDIT: the final version still seems to be wrong, the tex and itex seem to be identical. They are both displaying the top row of pixels missing on my computer.
 
Last edited:
DrGreg said:
EDIT: the final version still seems to be wrong, the tex and itex seem to be identical. They are both displaying the top row of pixels missing on my computer.

tex : [tex]\sqrt{\alpha \beta \gamma}[/tex]

itex : [itex]\sqrt{\alpha \beta \gamma}[/itex]

Top row seems to be fine.
 
[itex]\sqrt{iTeX}[/itex]
[tex]\sqrt{TeX}[/tex]

Problem only seems to happen with tall enough characters.