Search code examples
htmlcordovabackbone.js

MathJax not included in Cordova


I was using cdn path for MathJax file, but it was not working. So as suggested on https://groups.google.com/forum/#!topic/mathjax-users/aDIAR8ZxneI , I installed MathJax file locally and included in index.html In web it still works fine, but in cordova app the MathJax file is not included.


Solution

  • In cordova, no need to install mathJax. Including mathJax in following way fix the issue/error.

    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        // add your configuration, see following for example
        showProcessingMessages: false,
        tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
      });
    </script>
    <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script>
    

    Including file as "//cdn.mathjax.org/..." or "https://cdn.mathjax.org/..." will not include mathJax file.