Mathjax offline for web view

廉价感情. 提交于 2019-12-03 08:37:35

file:///android_asset/MathJax/Found the solution. Download your mathjax from

http://docs.mathjax.org/en/latest/installation.html

into => android/app/src/main/assets/

Now in your webview html code set script reference to

<script src="file:///android_asset/MathJax/MathJax.js?config=TeX-MML-AM_CHTML"></script>

and your necessary config inside html. Also make sure to set base url to your folder name.

<WebView source={{ html, baseUrl: 'file:///android_asset/MathJax/' }} />

Also you can https://github.com/mathjax/MathJax-grunt-cleaner to reduce the Mathjax asset size by removing unnecessary fonts and formats that you don't use.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!