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

LaTeX mangled in replies

  1. Sep 22, 2014 #1
    Not in all replies, but those created by selecting some text in the original message and clicking reply in the displayed context menu. If the selected text contains any LaTeX, it will be broken. Sorry if this has been reported earlier.
     
  2. jcsd
  3. Sep 22, 2014 #2
    Are you reporting that select-to-quote LaTeX will break? That should be expected as it doesn't transfer the code.
     
  4. Sep 22, 2014 #3
    I do not know what the official name of that feature is.

    Does "expected" mean it will always be like that, so I should simply not use that thing unless there is nothing but plain text in it?
     
  5. Sep 22, 2014 #4
    Correct because it doesn't copy the bbcode. The LaTeX is processed by JavaScript. It can't be copied.
     
  6. Sep 22, 2014 #5

    DataGG

    User Avatar
    Gold Member

    Why doesn't it work if we add the "latex initiators" ( the ## and $$ thingies)?

    When I select a portion of latex code and click on "reply", aren't those symbols the only thing missing to have latex working?
     
  7. Sep 22, 2014 #6
    There is code behind the symbols that doesn't get copied. You must do a full reply or quote to get the bbcode and equation code.
     
  8. Sep 22, 2014 #7

    Borek

    User Avatar

    Staff: Mentor

    In other words: it doesn't work only when you try to reply by marking text and selecting Reply from the local menu. Quote and Reply assigned to the whole post (buttons below the post) work OK.
     
  9. Sep 28, 2014 #8
    I clicked on the "Quote" link in my reply here, but it still got mangled.
     
  10. Sep 28, 2014 #9
    Oh and when I reply, the new post is not parsed for [itex] or [tex] tags (didn't try the others), have to reload the page to get the latex showing properly. Made me confused the first time, thought I had terminated the tags wrongly.

    No biggie but... :)
     
  11. Sep 28, 2014 #10

    TumblingDice

    User Avatar
    Gold Member

    Looked at the post you linked to. I can see the references to 1/r and 1/r2 in the quotes you inserted. (Pardon me for not LaTexing).

    I can't see anything mangled, and the post doesn't indicated it's been edited. (Staff or Mentor could have changed it.)
     
  12. Sep 28, 2014 #11

    Borek

    User Avatar

    Staff: Mentor

    It is this way since we moved to MarthJax. It doesn't process the page when it is modified client side by the JavaScript, only on reload.
     
  13. Sep 28, 2014 #12
    Sorry, that's what I meant. The latex tags aren't processed right.
     
  14. Sep 28, 2014 #13

    TumblingDice

    User Avatar
    Gold Member

    I'm feeling that I'm "out of my league" here, and maybe I should 'exit stage right'... But I can't help my yearning to understand.

    If nothing is displaying 'mangled', what is it that "isn't being processed right"...?
     
  15. Sep 28, 2014 #14
    I was just (yet again) confused by the client side voodoo this new board does. I see it shows up fine now.

    Personally I'd prefer a proper page reload on posting but I guess it keeps the server load down.
     
  16. Sep 28, 2014 #15

    TumblingDice

    User Avatar
    Gold Member

    Don't be so quick to question yourself. There are elves working at PF, 24/7!

    (Some might think Greg has cloned himself, but that's just silly.)

    I've seen more than a couple of things the past week that, I wonder if I should thank the elves, or just be worried that I didn't notice them before.

    P.S., Has anyone else noticed that bold, italic, etc... can be applied with Ctrl-B, Ctrl-I, ...? (Yeah, my education has been Windows)
     
  17. Sep 29, 2014 #16
    Not in my case. Because as soon as I post something with LaTex in and do not see that rendered, I do a page reload to make sure the end result looks good.
     
  18. Sep 29, 2014 #17

    Borek

    User Avatar

    Staff: Mentor

    Only a small percentage of posts contain LaTeX, so the net effect is positive.
     
  19. Sep 29, 2014 #18
    If that is so, would it be possible to automate this process? If a post contains LaTeX, the page is reloaded automatically? Or some magic done to make it rendered?

    I realize that even in the previous version we had problems with this, but I suppose that having a new version of the forum is reason enough to improve this. In my opinion, being able to post messages with LaTeX is more important than being able to post messages with fancy formatting, and fancy formatting is rendered in new posts without any sort of voodoo.
     
  20. Sep 29, 2014 #19

    Borek

    User Avatar

    Staff: Mentor

    That's an interesting idea @Greg Bernhardt

    Agreed on that, but these things are done by different systems and their integration is not necessarily easy. What you call fancy formatting is built into XenForo, LaTeX rendering is a separate, unrelated tool. In principle there is no reason why it shouldn't work the way you think (LaTeX being rendered automatically after posting), but as these things are developed separately by teams that don't care much about what the other team does (and it is hard to blame them for that), integration can be a nightmare.

    I wonder what would be the best way of dealing with the problem. Definitely some API call to MathJax to make it render only new post could make the integration easy.
     
  21. Sep 29, 2014 #20
    Seem the MathJax guys have thought about this problem: http://docs.mathjax.org/en/latest/typeset.html [Broken]

    So hopefully should be something that can be solved relatively pain-free.

    edit: as you can see further down on that page you can make it process specific elements in the DOM, and I presume each post has a DIV or something with a unique ID so it won't have to process the whole page again.
     
    Last edited by a moderator: May 7, 2017
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: LaTeX mangled in replies
  1. Quick reply (Replies: 29)

  2. Replies to threads (Replies: 4)

  3. Lost a long reply (Replies: 12)

  4. Can't reply. (Replies: 3)

Loading...