MathJAX首先在Angular app中加载

时间:2015-04-06 14:19:54

标签: angularjs mathjax mathml

我在another post中读过类似的内容,但我不明白如何解决这个问题。

我在Angular应用程序中使用MathJAX,但在第一次加载页面时,方程式无法正确呈现。

我正在加载库:

<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>

然后我在我的视图中使用MathML语法:

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>Pr</mi>
    <mo form="prefix">{</mo>
    <mfenced open='|' close='|' separators=''>
      <mtable>
        <mtr>
          <mtd>
            <mfrac>
              <mrow><mn>1</mn></mrow>
              <mo>N</mo>
            </mfrac>
            <mstyle displaystyle='true'>
            <munderover>
              <mo>&sum;</mo>
              <mrow>
                <mi>N</mi>
              </mrow>
              <mi></mi>
            </munderover>
            </mstyle>
            <mi>&xi;</mi>
            <mo>&minus;</mo>
            <mi>&mu;</i>
          </mtd>
        </mtr>
      </mtable>
    </mfenced>
    <mo>&lt;</mo>
    <mfrac>
      <mrow><mn>3</mn><mi>&sigma;</mi></mrow>
      <msqrt>
        <mo>N</mo>
      </msqrt>
    </mfrac>
    <mo form="postfix">}</mo>
    <mo>&asymp;</mo>
    <mn>99.8%</mn>
  </mrow>
</math>

视图由ngRoute调用。所以第一次加载页面我得到:

enter image description here

按F5我得到:

enter image description here

任何提示?

0 个答案:

没有答案