Troubleshooting Tex: Generated Formulas Not Matching Input

  • Thread starter 0xDEADBEEF
  • Start date
In summary, there is a bug in the TeX system on this website where it sometimes generates incorrect formulas that do not correspond to the input. This has been reported in multiple cases and seems to occur specifically during the preview feature. The suggested solution is to go ahead and post with the tags, and if there is still a problem, to edit the post. It is suggested that a hash table matching tex code to image files could be used to save space and handle previews consistently.
  • #1
0xDEADBEEF
816
1
Tex seems to be broken today. The generated formulas did not correspond to my input.
 
Physics news on Phys.org
  • #2
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
 
  • #3
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.
 
  • #4
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...
 
  • #5
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.
 
  • #6
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:

FAQ: Troubleshooting Tex: Generated Formulas Not Matching Input

1. Why are my generated formulas not matching the input?

There could be several reasons for this issue. One possibility is that there may be a mistake in the input data, such as a typo or missing information. Another possibility is that there may be an error in the formula generation process, such as a bug in the code or incorrect parameters being used.

2. How can I check for mistakes in my input data?

You can carefully review your input data for any typos or missing information. It may also be helpful to double check your data against any known examples or references. Using a debugging tool or printing out the data can also help identify any potential mistakes.

3. What should I do if there is an error in the formula generation process?

If you suspect that there is an error in the formula generation process, you can try troubleshooting the code by checking for any bugs or incorrect parameters. It may also be helpful to consult the documentation or seek assistance from other experts in the field.

4. Can using different software or versions affect the formula generation?

Yes, using different software or versions could potentially affect the formula generation process. It is important to ensure that you are using the correct software and version for your specific needs and that all necessary updates have been installed.

5. Is there a way to prevent formula generation errors in the future?

To help prevent formula generation errors, it is important to carefully review and verify your input data, regularly check for any bugs or errors in the code, and stay up to date with the latest software and versions. It may also be helpful to have a backup plan in case of any unexpected errors or issues.

Similar threads

Replies
6
Views
358
Replies
33
Views
6K
Replies
38
Views
2K
Replies
1
Views
1K
Replies
16
Views
2K
Replies
2
Views
1K
Replies
2
Views
854
Back
Top