Welcome to our community

Be a part of something great, join today!

LaTeX in chat

mathbalarka

Well-known member
MHB Math Helper
Mar 22, 2013
573
Use the javascript

Code:
javascript:(function(){if(window.MathJax===undefined){var%20script%20=%20document.createElement("script");script.type%20=%20"text/javascript";script.src%20=%20"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML";var%20config%20=%20'MathJax.Hub.Config({'%20+%20'extensions:%20["tex2jax.js"],'%20+%20'tex2jax:%20{%20inlineMath:%20[["$","$"],["\\\\\\\\\\\\(","\\\\\\\\\\\\)"]],%20displayMath:%20[["$$","$$"],["\\\\[","\\\\]"]],%20processEscapes:%20true%20},'%20+%20'jax:%20["input/TeX","output/HTML-CSS"]'%20+%20'});'%20+%20'MathJax.Hub.Startup.onload();';if%20(window.opera)%20{script.innerHTML%20=%20config}%20else%20{script.text%20=%20config}%20document.getElementsByTagName("head")[0].appendChild(script);}else{MathJax.Hub.Queue(["Typeset",MathJax.Hub]);}$('html').ajaxComplete(function(){MathJax.Hub.Queue(["Typeset",MathJax.Hub]);});})();
To view $\LaTeX$ in chat, atleast until it refreshes! This is taken from Rob Johnsons chatjax and other tools. I believe it can be tweaked a bit to make the LaTeX rendering permanent?
 

Jameson

Administrator
Staff member
Jan 26, 2012
4,043
Thank you for the suggestion! I will look into it. The first problem I see is that assuming this code does what we want it to, we want to use it only in the chat box and no where else. However the way we enable Mathjax is by using javascript in our global header, so having specific options for certain pages doesn't work well with this setup. Let me see what I can do.
 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
This is my opinion on the matter:

The live chat box is a place for people to discuss the things in their everyday lives, witty banter, off the wall musings. Text should be sufficient for this.

If people want to informally discuss things of a mathematical nature, where the use of $\LaTeX$ would be beneficial, I think our Chat Room subforum would be a better choice. More people would see it, and so there would be a better chance for more to be involved in the discussion.

Perhaps we could consider revising the description of the Chat Room subforum to encourage such informal math discussions. At present it says:

A place where you can chat with other members about anything non-math related
Maybe we could change it to something like:

A place where you can informally discuss anything socially acceptable you find interesting with other members
I added the part about "socially acceptable" as a reminder that things that are not suitable for minors, and potentially volatile subjects such as politics and religion are discouraged/prohibited.

We don't want people seeking help with problems there, nor do we want informal math discussions in our dedicated math subforums. Formal discussions are good to have in the math subforums, but musings and banter about math would be better suited for the Chat Room subforum.

Anyway, those are my thoughts...I think the effort required to get $\LaTeX$ to work in the live chat box is in all likelihood prohibitive considering the few times someone might want to include an expression in a comment there.