Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

TEX broken?

  1. Feb 21, 2010 #1
    Tex seems to be broken today. The generated formulas did not correspond to my input.
  2. jcsd
  3. Feb 21, 2010 #2


    User Avatar
    Science Advisor

    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
  4. Feb 21, 2010 #3

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    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.
  5. Feb 21, 2010 #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...
  6. Feb 21, 2010 #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.
  7. Feb 21, 2010 #6


    User Avatar
    Science Advisor

    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
    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 [Broken]
    https://www.physicsforums.com/latex_images/preview58041-1.png [Broken]

    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: May 4, 2017
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook