【问题标题】:How to convert numbers or characters to MathML format?如何将数字或字符转换为 MathML 格式?
【发布时间】:2020-10-16 19:27:43
【问题描述】:

示例,

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(&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;mn&gt;99&lt;/mn&gt;&lt;/math&gt;) 我正在使用mathtype_web

【问题讨论】:

    标签: javascript mathml mathtype


    【解决方案1】:

    &lt;mtext&gt; 前来救援。我们可以用它来渲染数字或字符。

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

    【讨论】:

      猜你喜欢
      • 2022-01-12
      • 1970-01-01
      • 1970-01-01
      • 2013-09-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-02-23
      • 1970-01-01
      相关资源
      最近更新 更多