3

I have searched for it and found that I have to run a link like this (RenderJax) which I found here. I have to bookmark this link and open it whenever I want to render MathJax in chat.

But the problem is whenever I open the bookmark, it opens in a new tab and keeps on loading forever. What should I do?

1
  • Thanks your answer is better than mine, I m deleting my post.
    – user404249
    Commented Oct 16, 2018 at 3:10

1 Answer 1

0

Finally, I succeeded to render MathJax for chats in an Android Browser. Here are the steps:

  1. Go to play store and install Opera mini.
  2. After you install the app, open it and go to Bookmarks, Press the 3 dots in the top right corner, press New bookmark.
  3. Paste the following javascript code in the field for URL.
javascript: (function() {
    if (window.MathJax === undefined) {
        var script = document.createElement("script");
        script.type = "text/javascript";
        script.src = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_HTML";
        var config = 'MathJax.Hub.Config({' + 'extensions: ["tex2jax.js"],' + 'tex2jax: { inlineMath: [["$","$"],["\\\\\\\\\\\\(","\\\\\\\\\\\\)"]], displayMath: [["$$","$$"],["\\\\[","\\\\]"]], processEscapes: true },' + 'jax: ["input/TeX","output/HTML-CSS"]' + '});' + 'MathJax.Hub.Startup.onload();';
        if (window.opera) {
            script.innerHTML = config
        } else {
            script.text = config
        }
        document.getElementsByTagName("head")[0].appendChild(script);
        (doChatJax = function() {
            window.setTimeout(doChatJax, 1000);
            MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
        })();
    } else {
        MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
    }
})();
  1. Type whatever the name you want. I prefer startJax.
  2. Open your chat page, the chat won't be rendered yet.
  3. Go to bookmarks, open you saved bookmark, Your chats will be rendered now.