MathJAX没有显示在网页上

时间:2012-05-17 19:17:20

标签: mathjax

我正在尝试在我的网页上启用MathJax,但它无法正常工作。

我首先尝试了一个简单的空HTML页面,如下所示:

    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
    </script>
    <script type="text/javascript"
      src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
    </script>

    <div style="offsetWidth: 720; offsetHeight: 54; width: 714px; height: 48px; position: static; top: auto; right: auto; bottom: auto; left: auto; margin-top: 0px; margin-right: 0px; margin-bottom: 6px; margin-left: 0px; color: #000000; display: block; visibility: visible">
    <p>
    </p><p>When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are<br>$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$</p>
    <p></p>
</div>

以上显示正确。

但是当我在网页上加入相同内容时,有其他元素和一些CSS,那么我得到一个“错误准备HTML-CSS输出(preProcess)”,公式被[MathProcessingError]替换。

我不知道这个问题提供了哪些更多信息。如果您需要更多信息,请告诉我。

1 个答案:

答案 0 :(得分:0)

今天我遇到了一个类似的问题,我得到了#34;错误准备HTML-CSS输出(preProcess)&#34;在我的消息日志中。我发现我有一个名为&#34; Error&#34;的全局javascript函数。这是从MathJax收到的消息&#34;重新启动&#34 ;.

删除全局错误函数允许MathJax无错误地呈现我的标记。