How to display math formulas in an android app?

I am trying to put math formulas in my Android app so that users can see how formulas look, i.e. distance formula. Is there a way to do this without importing third-party software? Or is this the only way? Thank you in advance.

+6
source share
2 answers

If you decide you can use the library, you can take a look at the JLaTeXMath referenced by this question , or you can try the jqMath mentioned here .

+3
source

If you need to dynamically create equations based on user input, you probably need a library.

You can get some formatting in HTML and use Html.fromHtml , but you will be limited. Mostly useful for sub and add-ons. For instance,

 Html.fromHtml("A<sup>2</sup>+B<sup>2</sup> = C<sup>2</sup>") 

gives a rendering of the Pythagorean equation.

If you do not need to dynamically generate equations, but instead you have a set of reference equations that you want to show unmodified, you can always transfer them to PNG and display them as images. There are additions to LaTeX and various online equation editors such as this one that will provide you with PNG.

+2
source

All Articles