LaTeX Strange Behavior - Image Offset on PhysicsForums

Click For Summary

Discussion Overview

The discussion revolves around issues related to LaTeX rendering on the Physics Forums platform, specifically focusing on the unexpected behavior of images generated from LaTeX code. Participants explore the nature of the problem, including image offsets and inconsistencies in tag usage.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant notes that not all images appear correctly and suggests an offset issue where the n-th bit of source appears at the (n+3)-th slot.
  • Another participant tests LaTeX code and finds it displays correctly, indicating that the issue may not be universal.
  • A suggestion is made to edit the problematic entry and save it without changes, referencing a previous bug fix.
  • One participant identifies a potential cause related to the mixing of upper case and lower case LaTeX tags, which seems to affect rendering.
  • Another participant observes that refreshing the page resolves the issue after editing LaTeX, questioning why this refresh is necessary.
  • A detailed explanation is provided about how the server generates and replaces LaTeX images, highlighting the caching behavior that may lead to viewing outdated images after edits.

Areas of Agreement / Disagreement

Participants express varying experiences with LaTeX rendering issues, with some agreeing on the impact of tag case sensitivity while others report different outcomes. The discussion does not reach a consensus on the root cause of the problems.

Contextual Notes

Limitations include the potential for cached images to display incorrectly after edits, and the dependence on specific tag formats that may not be consistently applied by users.

Vanadium 50
Staff Emeritus
Science Advisor
Education Advisor
Gold Member
Dearly Missed
Messages
35,014
Reaction score
21,714
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
Testing: \nu_\mu,~\nu_{\mu}

\nu_\mu,~\nu_{\mu}

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

PS: You should try inline \LaTeX for little bits in the middle of a sentence/paragraph.
 
Redbelly. I just did that. It looks the same, I'm afraid.
 
It's because some of your tags were and some were . For some reason, the software doesn't like this. I've amended them, and now it looks OK to me.
 
Last edited:
Thanks, Cristo.

How odd that upper case works and lower case works, but you can't mix them.
 
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?
 
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.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 0 ·
Replies
0
Views
6K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • Sticky
  • · Replies 60 ·
3
Replies
60
Views
190K
  • · Replies 766 ·
26
Replies
766
Views
745K