# LaTeX mangled in replies

1. Sep 22, 2014

### voko

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. Sep 22, 2014

### Greg Bernhardt

Are you reporting that select-to-quote LaTeX will break? That should be expected as it doesn't transfer the code.

3. Sep 22, 2014

### voko

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?

4. Sep 22, 2014

### Greg Bernhardt

Correct because it doesn't copy the bbcode. The LaTeX is processed by JavaScript. It can't be copied.

5. Sep 22, 2014

### DataGG

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?

6. Sep 22, 2014

### Greg Bernhardt

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.

7. Sep 22, 2014

### 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.

8. Sep 28, 2014

### Lord Crc

I clicked on the "Quote" link in my reply here, but it still got mangled.

9. Sep 28, 2014

### Lord Crc

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... :)

10. Sep 28, 2014

### TumblingDice

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.)

11. Sep 28, 2014

### 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.

12. Sep 28, 2014

### Lord Crc

Sorry, that's what I meant. The latex tags aren't processed right.

13. Sep 28, 2014

### TumblingDice

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"...?

14. Sep 28, 2014

### Lord Crc

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.

15. Sep 28, 2014

### TumblingDice

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)

16. Sep 29, 2014

### voko

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.

17. Sep 29, 2014

### Staff: Mentor

Only a small percentage of posts contain LaTeX, so the net effect is positive.

18. Sep 29, 2014

### voko

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.

19. Sep 29, 2014

### 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.

20. Sep 29, 2014