使用MathJax使用MathML输入和CSS/HTML渲染显示数学公式



我的脚本标签中缠绕的Mathml输入:

<script type="math/mml" id="scriptTag">
  <math>
    <mfrac>
      <msqrt>
        <mn>
          <semantics>
            <annotation-xml encoding='application/xhtml+xml'>
              <input xmlns='http://www.w3.org/1999/xhtml' type='text' size='4' />
            </annotation-xml>
          </semantics>
       </mn>
     </msqrt>
     <mn> 3 </mn>
    </mfrac>
  </math>
</script>

使用MathJax渲染后,TextBox实际上很小。我也尝试了CSS,但没有任何改变。有没有办法使CSS在其上使用,或者Mathjax用所需的大小渲染它?

Mathjax解析MathML并输出DOM元素。您可以检查并直接设计输出元素,也可以在JavaScript中使用MathJax CSS对象。

最新更新