Problems with previewing posts that use LaTeX

  • LaTeX
  • Thread starter NoPhysicsGenius
  • Start date
  • Tags
    Latex
In summary: WarrenIn summary, the conversation discusses a problem with the "Preview Post" function when using LaTeX equations in a post. The issue is caused by some browsers caching the images, leading to incorrect display of the equations. The problem has been resolved by adding expiration directives to the latex_images directory. The conversation also mentions that the final images generated after clicking "Submit" are different from those generated by the preview. It is suggested to make sure the tex is properly formatted and all tags are closed.
  • #1
NoPhysicsGenius
58
0
Say that I have the following LaTeX equation:

[tex]x = x_0 + v_{0x}t[/tex]

Let us then say that I click the "Preview Post" button in the "Post New Thread" dialog box.

So far, everything has gone fine.

However, say that I go to the above LaTeX equation and write (without the spaces before and after "tex" and "/tex":

[ tex ]x = x_0 + v_{0x}t + \frac{1}{2}a_{x}t^2[ /tex ]​

Then, say I click the "Preview Post" button for a second time. Guess what? The original equation still appears! Please try this to confirm what I am saying.

For more complex and multiple uses of the "[ tex ]" and "[ /tex ]" modifiers, multiple uses of the "Preview Post" button between edits leads to a mess so jumbled, I can no longer be confident that my message will be submitted intact. I find LaTeX to be a bit intimidating in the first place. As such, because of the problems I have been having with the "Preview Post" function, I have yet to use LaTeX in any of my posts. However, I need help with a problem using vectors, and I believe that the only way I will be able to generate an understandable post will be via the use of LaTeX.

So what is going wrong?

If this is an issue with my browser, I'll point out that I'm using Microsoft Internet Explorer 6.0 under Windows XP Service Pack 1.

If this isn't an issue with my browser, do you plan on fixing this problem any time soon?

Thank you.

P.S. I am assuming that when I finally get around to clicking on the "Submit New Thread" button that everything will be displayed correctly ...
 
Last edited:
Physics news on Phys.org
  • #2
It is, in fact, a browser issue. Your browser is caching the images, even when it should not. Some users have this problem, while most do not. I will look into modifying the .htaccess to force Pragma: no-cache ASAP to see if it makes any difference for you. The majority of our users have no problem.

The final images generated after clicking Submit are different than those generated by the preview and will not be affected.

- Warren
 
  • #3
Errr...I have this same problem.
 
  • #4
I've noticed this too. Pressing the Refresh button usually helps. Also make sure your tex is properly formatted, all tags are closed, etc, etc. I once put in a malformed tex string that the processor obviously couldn't do anything with, and IE displayed a tex image from a different post of mine.
 
  • #5
Okay, I've added expiration directives to the latex_images directory. Please let me know if the problem goes away.

- Warren
 
  • #6
Great news ... The "Preview Post" function now works for me with LaTeX. Thanks!
 
  • #7
chroot said:
Okay, I've added expiration directives to the latex_images directory. Please let me know if the problem goes away.

- Warren
Thanks! I've also had all the problems mentioned above at times. It has never been consistent though.

(And FWIW, it is not an IE thing as I'm using Firefox.)
 

Related to Problems with previewing posts that use LaTeX

1. What is LaTeX and why is it used in post previews?

LaTeX is a typesetting language commonly used in scientific and technical fields to format equations, symbols, and other complex mathematical expressions. It is used in post previews to accurately display these expressions in a readable and professional format.

2. Why do some posts with LaTeX not display correctly in the preview?

This could be due to a variety of reasons, such as incorrect formatting, missing packages, or compatibility issues with the platform being used. It is important to double check the LaTeX code and make sure all necessary packages are included in the post.

3. How can I fix the preview for my post with LaTeX?

If the issue is with formatting or missing packages, adjusting the code or adding the necessary packages should fix the preview. If the issue is with compatibility, it may be necessary to use a different platform or find a workaround for the LaTeX code.

4. Are there any alternatives to using LaTeX in post previews?

Yes, there are other tools and languages that can be used to format mathematical expressions in post previews, such as MathML and HTML. However, LaTeX is still the most commonly used and widely supported option for scientific and technical writing.

5. How can I learn to use LaTeX for post previews?

There are many online resources and tutorials available for learning LaTeX, including official documentation and community forums. It may also be helpful to consult with colleagues or mentors who are familiar with the language for guidance and support.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
23
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
868
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
866
Back
Top