View Full Version : LaTeX Preview is working again!
Hey all,
Just wanted to let you know I finished installing the code that enables LaTeX preview. Try it out and let me know if you find any bugs.
- Warren
Greg Bernhardt
Jun27-07, 05:39 PM
What a wonderful day! :biggrin:
Geez, that must've been really hard to fix. :P
berkeman
Jun27-07, 05:54 PM
I = I_S (e^\frac{qV}{kT} -1)
Thanks chroot! That really is a big help in posting replies. :biggrin:
FrogPad
Jun27-07, 05:55 PM
good day... good day :P
nice work chroot!
Geez, that must've been really hard to fix. :P
:uhh: Yeah... whew, I'm beat.
- Warren
{\rm\HUGE\color{red} JOY!}
Since the recent update, I just noticed that my blog/journal entries with attempts at \LaTeX now show graphic images... of the form "preview9587-0.png"... which are images from other LaTeX posts or previews of mine. They used to show the red "LaTeX image generation failed..." graphic. So, it seems that we are one step closer to LaTeX in the blog/journals... which might be a good place to place easier-to-find tutorials or notes... with no time limits on editing.. and no possible interference from other posters [but, of course, subject to approval by the mentors].
robphy,
I don't really have any intention of supporting LaTeX in blogs. What you're seeing is actually a bug: if the code is run inside anything other than a normal post, it assumes it's in a preview. That apparently wasn't a good plan...
- Warren
robphy,
I don't really have any intention of supporting LaTeX in blogs. What you're seeing is actually a bug: if the code is run inside anything other than a normal post, it assumes it's in a preview. That apparently wasn't a good plan...
- Warren
ok. i see.
But Thanks again for fixing the LaTeX preview! :smile::smile::smile::smile::smile::smile:
Thanks Warren.
\nabla \times \mathbf{H} = \mathbf{J} + \frac{\partial \mathbf{D}} {\partial t}
\oint_C \mathbf{H} \cdot \mathrm{d}\mathbf{l} = \int_S \mathbf{J} \cdot \mathrm{d} \mathbf{A} +
\int_S \frac{\partial\mathbf{D}}{\partial t} \cdot \mathrm{d} \mathbf{A}
Does this mean I can LaTeX all I want? How'd you get around the issues that were preventing you from doing it in the first place?
When couldn't you use LaTeX all you wanted?
I got around the issues by scouring the vB code for an hour or two and finding the right places to put my hooks. It was actually really easy to find a reasonable way to do it. I'm sorry I didn't do it a long time ago. :frown:
- Warren
neutrino
Jun28-07, 08:29 AM
\kappa oo\lambda or \chi \omega\omega\lambda? :biggrin:
CompuChip
Jun28-07, 09:56 AM
\varsigma o o \lambda
P.S. (yes, \iota\tau works)
P.P.S. so does inline :approve:
mattmns
Jun28-07, 10:34 AM
Awesome, thanks!
2 + 2 = 4
\begin{equation}\label{Eq2101}
m \ddot x (t) = R(t) - m \cdot g \cdot \sin \theta _E
\end{equation}
LaTeX in previews is not working for me. Since no one else is reporting this problem, is it some setting on my browser (IE 8) I need to configure or something with the cookie I have do?
The following should look like the fraction 2/3 formatted nicely, but what I see when I preview it is an integral sign.
\frac{2}{3}
Now that I've posted it, the LaTeX code renders correctly, but it didn't in the preview.
Any ideas?
Redbelly98
May4-09, 08:20 PM
Mark, yes, LaTex doesn't always display properly in preview mode.
FYI:
Previewing a message seems to show incorrect cached images instead of generating a new Latex image. No problem when you actually post the message.
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
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
May5-09, 07:25 PM
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?
It depends what forum you're in berkeman. Its not available in all of them.
berkeman
May6-09, 12:55 AM
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.
I just made a couple of posts, and LaTeX preview didn't work. :confused:
It still doesn't work, even after clearing my browser cache, deleting cookies etc. Does it work for the rest of you?!
Hootenanny
May7-09, 11:20 AM
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
May7-09, 12:52 PM
test \Omega \omega
worked in preview for me. IE7 on Vista (yuck)
LaTeX previews are not working for me. When I preview the code below I get the first four LaTeX images from this post (http://www.physicsforums.com/showpost.php?p=2179520&postcount=3) (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.
\int
\sum
3+3
x
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
May9-09, 07:58 PM
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
May10-09, 03:32 AM
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
May10-09, 03:32 AM
Aren't images which are used more than once generated once? For example, if I type \lambda once and then \lambda again, it generates, stores and inserts two separate images?
Apparently it does... that's weird
Redbelly98
May10-09, 06:52 AM
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.
Aren't images which are used more than once generated once? For example, if I type http://www.physicsforums.com/latex_images/21/2192470-0.png once and then http://www.physicsforums.com/latex_images/21/2192470-1.png again, it generates, stores and inserts two separate images?
Apparently it does... that's weird
Yup, those are two separate images with different URL's:
http://www.physicsforums.com/latex_images/21/2192470-0.png
and
http://www.physicsforums.com/latex_images/21/2192470-1.png
Fredrik
May10-09, 08:41 AM
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:
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
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.
- WarrenThe problem seems to be fixed, for me at least. Thank you!
Fredrik
May10-09, 04:47 PM
Okay guys, I added a bit of code that actively deletes stale preview images before generating new ones.
...
Let me know if anything changes for you.
Thank you. It's working fine for me now.
Fredrik
May11-09, 03:58 AM
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).
f'(x)
Nope, it looks fine when I post it.
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).
f'(x)
Nope, it looks fine when I post it.
Fredrik,
Fixed that one too. All should be well in LaTeX-land now.
- Warren
Fredrik
May11-09, 11:59 AM
Thank you. We're lucky to have you here. :smile:
2 + 2 = 4
2 + 2 = 5 :smile:
CompuChip
May22-09, 03:04 AM
2 + 2 = 5 :smile:
That is true, modulo one.
samieee
Mar24-10, 11:49 AM
\sum(A+BX_{i}-Y_{i})^2=0
\mbox{just practising}
Jonathan Scott
Apr6-10, 12:08 PM
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:
\frac{d\mathbf{p}}{dt} = \frac{E}{c^2} \mathbf{g} \left ( 1 + \frac{v^2}{c^2} \right )
Edit: When I submitted this one, the LaTeX now appears as a broken image marker.
Fredrik
Apr12-10, 09:06 PM
Johnathan: You need to use lowercase letters for the tex tags.
Is it just me, or do we now have to refresh after every preview to get the correct latex expression to show up? :confused:
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 TEX broken?.
I've just checked and the problem is still there.
Fredrik
Apr13-10, 08:18 AM
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.
Greg Bernhardt
Apr13-10, 10:03 AM
Latex preview is working fine for me, but I see old images for latex in private messages and profile visitor messages.
LaTeX has never worked in PMs and PVMs
fluidistic
Apr13-10, 03:26 PM
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:
Fredrik
Apr15-10, 08:12 AM
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...x, w, z. 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.
George Jones
Apr15-10, 02:21 PM
I have had problems with this today as well. A workaround is to (after a Ctrl-c for safety) refresh the composition page. Click on "Resend" in the Confirm window that opens.
NeoDevin
Apr15-10, 03:36 PM
LaTeX doesn't work in RSS feeds. I think this is by design though...
NeoDevin
Apr16-10, 11:34 AM
This is a test
This is only a test
Preview is not working for me, still getting old images.
Gokul43201
Apr16-10, 11:02 PM
NOTE: This is not about preview or latex in PMs/VMs etc.
Inline latex seems to be somewhat broken:
[ tex ]\dot \theta[ /tex ] = \dot \theta
[ itex ]\dot \theta [ /itex ] = \dot \theta
However, [ itex ]\dot x \dot k[ /itex ] = \dot x \dot k
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.
Fredrik
Apr17-10, 01:40 AM
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: \mathbb R) 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.
NOTE: This is not about preview or latex in PMs/VMs etc.
Inline latex seems to be somewhat broken:
[ tex ]\dot \theta[ /tex ] = \dot \theta
[ itex ]\dot \theta [ /itex ] = \dot \theta
However, [ itex ]\dot x \dot k[ /itex ] = \dot x \dot k
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.
\sqrt{X} = \sqrt{X}
\sqrt{X} = \sqrt{X}
(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.
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 : \sqrt{\alpha \beta \gamma}
itex : \sqrt{\alpha \beta \gamma}
Top row seems to be fine.
NeoDevin
Apr17-10, 12:45 PM
\sqrt{iTeX}
\sqrt{TeX}
Problem only seems to happen with tall enough characters.
Fredrik
Apr19-10, 10:37 AM
They are both displaying the top row of pixels missing on my computer.
That seems to be an issue with the noparse tags, not with tex or itex. I have noticed before that noparse doesn't always work as advertised.
Gokul43201
Apr28-10, 09:16 AM
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: \mathbb R) 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.Thanks for the pointer, Fredrik. I've definitely noticed the line-spacing issue, but oddly, never noticed the other problem until now. And I find it hard to believe that I've only ever used dots or vectors on tall symbols within tex tags and never with itex (but I guess that's possible)!
Dickfore
May5-10, 11:42 AM
The LaTeX preview does not work for me. When I hit the Preview Post button, I see my old equations. What is the solution?
The LaTeX preview does not work for me. When I hit the Preview Post button, I see my old equations. What is the solution?
Use your browser's command to refresh the window after the "Preview Post" has gone wrong. See post #53.
By the way, does anyone know if chroot is aware of this problem?
I'm aware of it, I just can't tell if it's something going on on the server end, or the client end. Nothing on the site itself has changed, so it's either something caused by a downstream provider (i.e. a caching proxy server), something in some newer version of a browser, or...
I will do some poking around to gather some evidence of these hypotheses.
- Warren
Fredrik
May14-10, 02:53 AM
I'm using Firefox 3.6.3 on Windows 7, but I just tried it with Internet Explorer 8.0.7600.16385 on the same computer, and it has the same problem. The refresh/resend workaround works in IE too.
Gokul43201
May14-10, 09:42 AM
Likewise with Firefox 3.0 on OS X.
Dickfore
May14-10, 12:08 PM
In Google Chrome on Windows Vista too.
\int_{-\infty}^{\infty}{\int_{-\infty}^{\infty}{e^{\textup{i} \, k \, (x - x')} \, f(x') dx' \, \frac{dk}{2\pi}}} = f(x)
Saladsamurai
May15-10, 04:33 PM
Test1
\int_0^\infty e^{-x}\,dx
Nope. Problem exists using Google Chrome on OSX too.
Mentallic
May19-10, 07:54 AM
I also use google chrome, and I can vouch for Saladsamurai that preview only works sometimes (better than before though).
Fredrik
Jun14-10, 08:49 PM
I just did another test. Logging out and back in again doesn't solve the issue, but when I logged out, restarted the browser, cleared the browser cache and logged back in, it worked as it should. (But only once). I also tried to just clear the browser cache between previews, and that didn't work. Really weird.
I have the same problem [Chrome/Firefox under Windows 7]
The only workaround that works for me is refreshing the preview page.
Fredrik
Jun16-10, 02:50 AM
test a foo e bar c.
Edit: D'oh. I meant to just preview that, not post it. At least I learned something, I think. Clearing the cache for the last hour doesn't help, but clearing the cache and the cookies. for the last hour does help. Hm, I guess I should try just the cookies too.
Uh...just clearing the cookies is not sufficient, and now I see that clearing both the cookies and the cache doesn't work either. Not when I preview anyway. I'll have to post this to see if "preview changes" behaves differently than "save changes".
Yes, it does. If I clear both before I post, it will look OK immediately after I have posted (without the refresh that's needed otherwise). This isn't at all useful as some sort of workaround, but maybe it will help chroot figure out what's wrong.
CompuChip
Jun16-10, 03:58 AM
Wait, you find clearing your cookies and cache before posting (and then probably having to re-login and stuff) easier than pressing F5 once?
Fredrik
Jun16-10, 08:04 AM
You may want to read the last paragraph of my post again. :smile:
Jonathan Scott
Jul11-10, 09:45 AM
I can't get TeX to work at all (Chrome 6), not even after clearing cache and refreshing, and I tried submitting. I may have had errors in my first attempt, but I don't see any now. This is inline: Gm
This is display:
Gm
I've tried it in Firefox too. No different.
(I see on coming back later that the inline one is now displaying, but the display one is still just a broken image)
Jonathan Scott
Jul13-10, 09:42 AM
I can't get TeX to work at all (Chrome 6), not even after clearing cache and refreshing, and I tried submitting. I may have had errors in my first attempt, but I don't see any now. This is inline: Gm
This is display:
Gm
I've tried it in Firefox too. No different.
(I see on coming back later that the inline one is now displaying, but the display one is still just a broken image)
Seems to be working today (apart from the usual need to refresh during preview). This could perhaps be related to the fact that I apparently used TEX tags in upper case instead of tex in lower case. I had tried both, but I may have made some other mistake when I was using the lower case version.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.