I am trying to show math formula in my android app I use tiny_mce with WIRIS plugin to write formula as image below
the editor store the formula in the database as the following format
<p><math xmlns="http://www.w3.org/1998/Math/MathML"><mroot><mrow><mn>3</mn>
<mi>x</mi></mrow><mn>2</mn></mroot><mo>×</mo><mn>2</mn>
<mimathvariant="normal">π</mi></math></p>
I also use MathView in my android app to show this formula as following
MathView testMathView=(MathView) findViewById(R.id.test);
testMathView.setText("<p><math xmlns=\"http://www.w3.org/1998/Math/MathML\">" +
"<mroot><mrow><mn>3</mn><mi>x</mi></mrow><mn>2</mn></mroot>" +
"<mo>×</mo><mn>2</mn><mi mathvariant=\"normal\">π</mi></math></p>");
but it doesn't work it shows me the only numbers without mathematics formula symbols
here are a GitHub library and tutorial for MathView which doesn't work with outputs of wiris editor MathView on github
could you please give any help or suggestions to show wiris output format in android app?
As I read in docs on GitHub, which you linked, you should set auto:engine="MathJax"
in MathView
and setText
as below:
testMathView.setText("$$<p><math xmlns=\"http://www.w3.org/1998/Math/MathML\">" +
"<mroot><mrow><mn>3</mn><mi>x</mi></mrow><mn>2</mn></mroot>" +
"<mo>×</mo><mn>2</mn><mi mathvariant=\"normal\">π</mi></math></p>$$");
Hope that this will work.