【发布时间】:2018-03-01 21:28:05
【问题描述】:
我试图在我的 android 应用程序中显示数学公式我使用 tiny_mce 和 WIRIS 插件来编写公式,如下图所示
编辑器将公式存储在数据库中,格式如下
<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>
我还在我的 android 应用程序中使用 MathView 来显示这个公式,如下所示
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>");
但它不起作用,它显示了唯一没有数学公式符号的数字
这里有一个 MathView 的 GitHub 库和教程,它不适用于 wiris 编辑器的输出 MathView on github
您能否提供任何帮助或建议以在 android 应用中显示 wiris 输出格式?
【问题讨论】:
标签: java android android-studio tinymce-4 wiris