【问题标题】:Display math formula with text inputs using MathJax with MathML input and CSS/HTML rendering使用带有 MathML 输入和 CSS/HTML 渲染的 MathJax 显示带有文本输入的数学公式
【发布时间】:2014-01-29 15:20:48
【问题描述】:

我将 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 渲染后,文本框非常小。我也尝试了css,但没有任何改变。有没有办法让 css 在上面工作,或者 MathJax 以所需的大小渲染它?

【问题讨论】:

    标签: javascript html css mathjax mathml


    【解决方案1】:

    MathJax 解析 MathML 并输出 DOM 元素。您可以检查并直接设置输出元素的样式,也可以在 javascript 中使用 MathJax CSS Objects

    【讨论】:

      猜你喜欢
      • 2021-10-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-02-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-30
      相关资源
      最近更新 更多