首页 > 解决方案 > 如何将数字或字符转换为 MathML 格式?

问题描述

示例示例,

yes -> <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>y</mi><mi>e</mi><mi>s</mi></math>
99  -> <math xmlns="http://www.w3.org/1998/Math/MathML"><mn>99</mn></math>

对于那些给定的输入,我想获得相应的 mathml 表达式。我这样做是因为mathtype.setMathML(99)不起作用,应该是mathtype.setMathML(<math xmlns="http://www.w3.org/1998/Math/MathML"><mn>99</mn></math>) 我正在使用mathtype_web

标签: javascriptmathmlmathtype

解决方案


<mtext>进入救援。我们可以用它来渲染数字或字符。

mathtype.setMathML(<math xmlns="http://www.w3.org/1998/Math/MathML"><mtext>{NUMBER or CHARACTERS}</mtext></math>)

推荐阅读