Troubleshooting Tex: Generated Formulas Not Matching Input

  • Thread starter Thread starter 0xDEADBEEF
  • Start date Start date
AI Thread Summary
Tex is experiencing issues where generated formulas do not match the input provided by users, leading to confusion and incorrect outputs. This problem has been noted particularly in the preview mode, where valid TeX input results in unrelated formulas or graphic question marks. Users have reported that the issue may stem from server handling of TeX inputs, potentially mixing up images from different posts. While some formulas appear correctly in preview for certain users, others consistently encounter errors. A suggestion was made to implement a hash table for managing TeX code and image files to improve reliability and consistency in output.
0xDEADBEEF
Messages
815
Reaction score
1
Tex seems to be broken today. The generated formulas did not correspond to my input.
 
Physics news on Phys.org
0xDEADBEEF said:
Tex seems to be broken today. The generated formulas did not correspond to my input.

Where did this occur? I've seen cases where it can happen in a PM or a blog, but usually it is when looking at someone else's formula. I'd be interested to see how it occurred for you.

See [post=2519903]msg #7[/post] of thread "Latex Feature", and more as the thread goes on, for the other cases I know of.

Cheers -- sylas
 
0xDEADBEEF said:
Tex seems to be broken today. The generated formulas did not correspond to my input.
Given your user name I assume you know a little bit about programming.

At a minimum, a computer application must yield correct output given valid input. The TeX system here does achieve this minimal requirement. The next step up, making the system yield correct output given *invalid* input can be very, very hard. The correct output for invalid input is some kind of error response, such as a message telling the user he messed up. The TeX system here does not make that next step. The response to invalid input in preview mode is to display some previously-created TeX output. When posted, the invalid TeX block becomes a graphic question mark.
 
The problem was very weird. The tex output was simply not related to the input at all. I had just written some sub and super scripts, and the output yielded some completely unrelated formula some polynomial and something with a square root an imaginary units. It looked like it used the temporary files of another persons input...
 
It happened to my first answer to "Electric and Magnetic fields" in the Electrical Engineering forum. When I enclosed the tex source in tex brackets.
 
0xDEADBEEF said:
It happened to my first answer to "Electric and Magnetic fields" in the Electrical Engineering forum. When I enclosed the tex source in tex brackets.

OK... a link to your post is [post=2590429]msg #2[/post] of thread "Electric and Magnetic fields". The post currently does not have tex tags applied, and it is not edited, so I presume this means you saw the effect occur when you used the "preview" feature while posting.

The tex formula is \gamma^{-1}A_M, which is correct, so it is not a case of invalid input. It really is a bug in the handling of correct tex input. With tags, the formula appears as
\gamma^{-1}A_M​
With the inline tags, the formula appears as \gamma^{-1}A_M

In both cases it appears correctly in preview for me, but I don't doubt that it failed for you. The phenomenon you describe is very similar to the errors I noted in blogs and PMs, to which I linked in my first reply. In this case, when I preview the images they have the following form:
https://www.physicsforums.com/latex_images/preview58041-0.png
https://www.physicsforums.com/latex_images/preview58041-1.png

I have no idea what those links with give at present. But obviously, the server does not want to save images indefinitely that have been used only in a preview.

The URL for the images in the file post will be different, and I would have to put them in with an edit. But you can look at the url for the images yourself. It may be an unusual case with some kind of conflict leading to a mix up of images with another post being written at the same time; I don't know. But there is a problem here. My advice is to go ahead and post with the tags, and see how it looks then. I think that the URLs for posts tend to be reliable. If there is still a problem, you can always edit the post.

Without seeing the code I can't say what the problem actually is. But generally speaking, to save space with image files from latex, a reliable method would be to provide a hash table matching tex code to image files, with a reference counter for garbage collection. This way common latex formulae would have only one image file, and preview could be handled consistently with images for posts. chroot may like to consider this, and if I can help, feel free to PM me.

Cheers -- sylas
 
Last edited by a moderator:
I want to thank those members who interacted with me a couple of years ago in two Optics Forum threads. They were @Drakkith, @hutchphd, @Gleb1964, and @KAHR-Alpha. I had something I wanted the scientific community to know and slipped a new idea in against the rules. Thank you also to @berkeman for suggesting paths to meet with academia. Anyway, I finally got a paper on the same matter as discussed in those forum threads, the fat lens model, got it peer-reviewed, and IJRAP...
About 20 years ago, in my mid-30s (and with a BA in economics and a master's in business), I started taking night classes in physics hoping to eventually earn the science degree I'd always wanted but never pursued. I found physics forums and used it to ask questions I was unable to get answered from my textbooks or class lectures. Unfortunately, work and life got in the way and I never got further the freshman courses. Well, here it is 20 years later. I'm in my mid-50s now, and in a...
Back
Top