LaTeX Strange Behavior - Image Offset on PhysicsForums

In summary: If you want to see the changes that you have made to a latex image, you need to reload the post and view the new image.
  • #1
Vanadium 50
Staff Emeritus
Science Advisor
Education Advisor
2023 Award
33,246
19,741
If you check out https://www.physicsforums.com/showthread.php?t=282332", you'll see some LaTeX strangeness.

Specifically, not all the images appear, and the ones that do appear seem not to match the LaTeX source. It's almost as if the images are offset: i.e. the n-th bit of source ends up displayed at the (n+3)-th slot.
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
Testing: [itex]\nu_\mu,~\nu_{\mu}[/itex]

[tex]\nu_\mu,~\nu_{\mu}[/tex]

Seems to be okay here. Can't think of anything obvious that would do this just there.

PS: You should try inline [itex]\LaTeX[/itex] for little bits in the middle of a sentence/paragraph.
 
  • #3
Vanadium,

You might try editing your entry that has the odd LaTex, and then SAVE it without actually changing anything. At least, that trick worked on a different bug that occurred in the PF Library ... see my comment of Jan1-09 here:
https://www.physicsforums.com/library.php?do=view_item&itemid=25
 
  • #4
Redbelly. I just did that. It looks the same, I'm afraid.
 
  • #5
It's because some of your tags were [TEX] and some were [tex]. For some reason, the software doesn't like this. I've amended them, and now it looks OK to me.
 
Last edited:
  • #6
Thanks, Cristo.

How odd that upper case works and lower case works, but you can't mix them.
 
  • #7
I've seen that happen when editing LaTex. Clicking the refresh button clears it up. Now, does anyone know why it is necessary to "refresh" when you when you have just saved an edit?
 
  • #8
HallsofIvy said:
I've seen that happen when editing LaTex. Clicking the refresh button clears it up. Now, does anyone know why it is necessary to "refresh" when you when you have just saved an edit?
When you submit a post containing latex tags the server recognises the tags and generates the latex output from your source. The output is saved as an image file with name corresponding to the post number and the equation number in that post: "[post number]-[equation number].png". So for example, if I were to create a latex equation in this post, it's file name would be "2029042-0.png". If I were then to create an additional equation, it would be named "2029042-1.png" and so forth.

Now once the server has created the image, it replaces the latex source in your post with the URL of the latex image. When you click edit the server then replaced the latex image with the latex source so you can edit it. Now, when you edit a latex equation and click save, the server re-generates the latex image and overwrites the existing latex image file; so if I were to edit the equation corresponding to "2029042-0.png" then the new latex image also be called "2029042-0.png" and would replace the old file.

Unfortunately, the way VBulletin is coded means that when you click save, only the text in your post is refreshed, meaning that you will be viewing cached images. This is good in one respect in that you don't have to waste bandwidth re-downloading images if you simply want to edit a post, however bad in another respect if you have edited a latex image.
 

1. Why is my image offset in LaTeX on PhysicsForums?

There could be several reasons for this behavior. One possible reason is that the image is not properly aligned with the text in your LaTeX code. Another reason could be that the image size is larger than the available space, causing it to be shifted to fit. Additionally, the LaTeX renderer may have a bug or be incompatible with certain image formats.

2. How can I fix the offset in my LaTeX image on PhysicsForums?

To fix the offset, you can try adjusting the alignment of the image in your LaTeX code. You can also resize the image to fit the available space, or try converting the image to a different format that is compatible with the LaTeX renderer. If the issue persists, you can reach out to the PhysicsForums community for help or report the issue to the website administrators.

3. Is there a specific format or size requirement for images in LaTeX on PhysicsForums?

There is no specific format or size requirement for images in LaTeX on PhysicsForums. However, it is recommended to use standard image formats such as PNG or JPEG, and to resize the image to fit the available space. It is also important to ensure that the image is properly aligned with the text in your LaTeX code.

4. Why does the image offset only occur on PhysicsForums and not other websites?

This could be due to the fact that PhysicsForums uses a specific LaTeX renderer that may have different settings or compatibility with certain image formats. It is also possible that the website has a specific CSS style that affects the positioning of images in LaTeX. It is best to reach out to the PhysicsForums community or website administrators for further assistance.

5. Can I use custom CSS to adjust the image offset in my LaTeX code on PhysicsForums?

Yes, you can use custom CSS to adjust the image offset in your LaTeX code on PhysicsForums. You can add CSS code to your LaTeX document or use the website's built-in CSS editor. However, it is recommended to first try adjusting the alignment and size of the image in your LaTeX code before resorting to custom CSS.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
265
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
5K
  • Special and General Relativity
Replies
1
Views
523
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • Sticky
  • MATLAB, Maple, Mathematica, LaTeX
2
Replies
64
Views
183K
Back
Top