Use MathJax offline in org-mode export

Is there any way to use MathJax in emacs org-mode html export without an internet connection?

I know that MathJax can be downloaded, but when I provide org-html-mathjax-options with the path to MathJax.js, the html file doesn't use MathJax at all.

Any help would be appreciated. Thanks!

Update -- this has been answered.

When in org-html-mathjax-options, set path to /<path-to-mathjax>/MathJax/MathJax.js?config=TeX-AMS_HTM‌​L,local/local

• Interesting I never used MathJax with org-mode. I think... So, thinking out loud, If getting to MathJax.js through the web works, I would try to get to it through a local server. i.e. something like http://localhost/<path-to-mathjax-folder>/MathJax.js (it depends on how the server is set up) Jan 30 '17 at 20:52
• @RolazaroAzeveires strangely that does not work. Nor does file:///<path-to-mathjax-folder>/MathJax.js. Jan 30 '17 at 22:07

This works for me, as a local setting, instead of

#+HTML_MATHJAX:  path:"http://localhost/<path-to-mathjax>/MathJax.js"


use

#+HTML_MATHJAX:  path:"http://localhost/<path-to-mathjax>/MathJax.js?config=TeX-AMS_HTML"


I do not know why, both manuals from emacs and org-mode do not use this config, so any further explanation is welcome. I got there by noting that the default value includes this config option, not a plain path.

According to user14743's comment, in org-html-mathjax-options, set the path to /<path-to-mathjax>/MathJax/MathJax.js?config=TeX-AMS-MML_HTM‌​LorMML,local/local.

I note that file://... does not work either way.

• You just had to put that at the top of your file? I tried and still, strangely, nothing. I'm glad you were able to make it work in principle, at least, even though I can't get it to work over here. That makes me a little optimistic that I can get it set up. I had thought maybe it was due to one of my Firefox extensions, but this failed even after disabling them. Feb 1 '17 at 3:51
• @user14743, yes. I am not sure what else to suggest... Can you see the MathJax.js file if you use the path in your browser? The path must be the path seen by the local host, not the one on the hard disk. Feb 1 '17 at 21:58
• I'm unable to post an answer for some reason. I can't see the CAPTCHA box so that I can click it and prove I'm a human. Anyway, I was able to solve it. When in org-html-mathjax-options, set path to /<path-to-mathjax>/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML,local/local Feb 2 '17 at 18:14
• Feel free to update your answer to reflect this and I'll mark it as solved. This will help future people find the answer to this question. Feb 2 '17 at 18:15

Thanks for your post. I find this works for me,

#+HTML_MATHJAX:  path:"file:///<path-to-mathjax-folder>/MathJax.js?config=TeX-AMS_HTML"


However, this does not work,

#+HTML_MATHJAX:  path:"http:/localhost/<path-to-mathjax-folder>/MathJax.js?config=TeX-AMS_HTML"


I don't know why. This just provides an alternative way.

• The second version should be http:// not http:/. May be that it is the reason it didn't work for you. Dec 10 '19 at 13:37
• I tried both http:// and https://. Neither of them worked. Dec 12 '19 at 10:29
• I also tried /<path-to-mathjax-foler>/ without file:///. It unexpectedly worked. I tried all of these on a Mac. The third one looks like the version file:///. To get http:// work, it may need some other configurations. Dec 12 '19 at 10:42