How to practically display math formula in Android

落花浮王杯 提交于 2019-11-29 00:34:19

问题


I researched on this for quite a while and I know this kind of questions already answered. But I couldn't find a right answer showing how to practically deal with math formula in Android app. Without including large amount (5~20MB) of files in the Android project, it seems that there is no way to parse & display math formula script like MATHML. I looked at JEuclid and MathJax that were mentioned a lot for Android but I found them in this category.

So at this point, the only way I can think of is to take each of those formula in a image file and display it on Android. But in practice, that manual process is really slow. I am sure this is not a right way.

So I have to ask this again. How to practically display math formula in your Android app?


回答1:


You can not set maths formula to TextView in android. You have to use WebView in which you can display maths formulae. See mathjax for more information. if you want to display for android then here is library you can implement in your project. mathjaxwebview




回答2:


If you want to parse Tex(Inline mode and display mode) formats and ASCII math format you can use this link .I used the above math view given in this link to display formula.It worked like a charm adding to that download mathjax from official site and get fonts folder and put it in your assets folder. It will definitely work.

https://github.com/Nishant-Pathak/MathView

download math view form above link.



来源:https://stackoverflow.com/questions/8359032/how-to-practically-display-math-formula-in-android

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