Troubleshooting Tex: Generated Formulas Not Matching Input

  • Thread starter Thread starter 0xDEADBEEF
  • Start date Start date
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
[tex]\gamma^{-1}A_M[/tex]​
With the inline tags, the formula appears as [itex]\gamma^{-1}A_M[/itex]

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:

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
Replies
3
Views
1K
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 33 ·
2
Replies
33
Views
8K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 38 ·
2
Replies
38
Views
6K