Register to reply

LaTeX Preview is working again!

by chroot
Tags: latex, preview, working
Share this thread:
Mark44
#19
May4-09, 07:39 PM
Mentor
P: 21,215
Now that I've posted it, the LaTeX code renders correctly, but it didn't in the preview.
Any ideas?
Redbelly98
#20
May4-09, 08:20 PM
Mentor
Redbelly98's Avatar
P: 12,070
Mark, yes, LaTex doesn't always display properly in preview mode.

FYI:

Quote Quote by DrGreg View Post
Previewing a message seems to show incorrect cached images instead of generating a new Latex image. No problem when you actually post the message.
Quote Quote by Redbelly98 View Post
Yes, this was a problem even before the recent LaTex issues of 1 or 2 weeks ago. I guess there is no easy fix, or it would have been fixed already, and so we just live with it.

This is one reason why I avoid LaTex unless absolutely necessary, and instead copy-and-paste the symbols linked to in my sig. If you just need to use the occasional Greek letter, the copy-and-paste route is definitely preferable.

It's worth mentioning that we have LaTex mainly (perhaps entirely?) due to the efforts of one of the PF volunteer staffmembers, chroot.
Regards,

Mark
Mark44
#21
May4-09, 08:25 PM
Mentor
P: 21,215
Up until the recent problem with the hard drive failure (I think that was the problem), LaTeX preview worked perfectly for me. I'm glad to see that it works now when you submit your post, but being able to preview it is a nice feature when you're working with definite integrals or matrices or the like.
Mark
berkeman
#22
May5-09, 07:25 PM
Mentor
berkeman's Avatar
P: 40,729
I may be a little slow, so apologies if this has been asked and answered already. I dont see the LaTex button in the Advanced Reply or New Topic windows anymore. Am I missing it?
Kurdt
#23
May5-09, 08:22 PM
Emeritus
Sci Advisor
PF Gold
P: 4,981
It depends what forum you're in berkeman. Its not available in all of them.
berkeman
#24
May6-09, 12:55 AM
Mentor
berkeman's Avatar
P: 40,729
Quote Quote by Kurdt View Post
It depends what forum you're in berkeman. Its not available in all of them.
Hah! That's it Kurdt, thanks.

The thread that confused me is currently posted in Computer Science / Math Software, and there is no LaTex sigma available there:

http://www.physicsforums.com/showthread.php?t=312053

But you're correct, I see it in EE and in the Homework Help forums. I had held off moving the post at the link above until I could figure out (whenever the OP responds to my question) where to move it. I tried to refer to the LaTex button in my post, but noticed that it wasn't available as I was making my reply.

Thanks for clarifying this for me. Makes sense now.
Fredrik
#25
May7-09, 02:52 AM
Emeritus
Sci Advisor
PF Gold
Fredrik's Avatar
P: 9,268
I just made a couple of posts, and LaTeX preview didn't work.
Fredrik
#26
May7-09, 11:13 AM
Emeritus
Sci Advisor
PF Gold
Fredrik's Avatar
P: 9,268
It still doesn't work, even after clearing my browser cache, deleting cookies etc. Does it work for the rest of you?!
Hootenanny
#27
May7-09, 11:20 AM
Emeritus
Sci Advisor
PF Gold
Hootenanny's Avatar
P: 9,781
Quote Quote by Fredrik View Post
It still doesn't work, even after clearing my browser cache, deleting cookies etc. Does it work for the rest of you?!
It's working for me (Firefox 3, Fedora 10).
berkeman
#28
May7-09, 12:52 PM
Mentor
berkeman's Avatar
P: 40,729
test [tex]\Omega \omega [/tex]

worked in preview for me. IE7 on Vista (yuck)
Fredrik
#29
May9-09, 05:57 PM
Emeritus
Sci Advisor
PF Gold
Fredrik's Avatar
P: 9,268
LaTeX previews are not working for me. When I preview the code below I get the first four LaTeX images from this post (starting with the one I quoted from Strangerep's post). I have tried this from three different computers and I get the same result every time. It doesn't matter if I use Firefox or IE, or if I use XP or Vista. This is definitely tied to my user account somehow.

[tex]\int[/tex]

[tex]\sum[/tex]

[tex]3+3[/tex]

[tex]x[/tex]

By the way, when I wrote #5 in that thread, I messed up some tex or itex tag and got a very weird result. The last paragraph ended up outside the rectangular area where the post is supposed to be. It was below the "report" button. Something is really weird here. (That post went back to normal when I fixed the broken tags).
Redbelly98
#30
May9-09, 07:58 PM
Mentor
Redbelly98's Avatar
P: 12,070
I know that Greg or chroot had explained this before. From what I remember, it has to do with LaTex code causing a new image to be generated. This is a CPU-intensive process, or perhaps it had to do with the images taking up hard drive space. At any rate, generation of new fresh images is not done everytime a post with LaTex code is viewed. That's why old or wrong LaTex images sometimes show up.

Refreshing a post should force new, correct images to be generated. But refreshing a preview does not do this, apparently.

At least this is my understanding. Greg definitely prefers we not use LaTex for simple things like Greek characters, superscripts, and subscripts that can be done easily without LaTex.
Fredrik
#31
May10-09, 03:32 AM
Emeritus
Sci Advisor
PF Gold
Fredrik's Avatar
P: 9,268
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).
CompuChip
#32
May10-09, 03:32 AM
Sci Advisor
HW Helper
P: 4,300
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]
Redbelly98
#33
May10-09, 06:52 AM
Mentor
Redbelly98's Avatar
P: 12,070
Quote Quote by Fredrik View Post
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.

Quote Quote by CompuChip View Post
Aren't images which are used more than once generated once? For example, if I type once and then 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:
http://www.physicsforums.com/latex_i.../2192470-0.png
and
http://www.physicsforums.com/latex_i.../2192470-1.png
Fredrik
#34
May10-09, 08:41 AM
Emeritus
Sci Advisor
PF Gold
Fredrik's Avatar
P: 9,268
Quote Quote by Redbelly98 View Post
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.
DrGreg
#35
May10-09, 11:35 AM
Sci Advisor
PF Gold
DrGreg's Avatar
P: 1,843
Quote Quote by Fredrik View Post
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.
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.
chroot
#36
May10-09, 02:02 PM
Emeritus
Sci Advisor
PF Gold
chroot's Avatar
P: 10,428
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


Register to reply

Related Discussions
Post preview not working? Forum Feedback & Announcements 2
Preview option and LaTex images Forum Feedback & Announcements 4
Can't preview LaTeX Forum Feedback & Announcements 4
Latex is not working Forum Feedback & Announcements 2