当我的页面在Dropbox上时,不会呈现mathjax

时间:2015-05-20 13:34:13

标签: mathjax

我在Dropbox上有一些 mathjax增强的 WWW页面(例如,mathjax_test.html),这些页面都是这样呈现的

enter image description here

在localhost上,它们像这样呈现

enter image description here

页面的代码是

<html>
  <script type="text/javascript"
    src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
  <head>
    <title>Test of mathjax</title>
    <meta http-equiv="content-type" content="text/html;charset=latin-1"></>
  </head>
  <body>
      We analyze the common case in which the dynamic load can
      be expressed by a constant load vector \(\boldsymbol r\)
      modulated by an adimensional function of time,
      \(f(t)\) (e.g., the seismic excitation can be
      described in such terms).
  </body>
</html>

从Dropbox获取页面时,是否可以执行某些操作以正确呈现mathjax代码?

1 个答案:

答案 0 :(得分:2)

问题是Dropbox仅提供https以上的内容,但在源代码中MathJax.js是通过src="http://cdn.mathjax.org/...加载的。

浏览器阻止此类http调用(请参阅this SO post),因此MathJax未加载,因此无法呈现页面。

(您可以在浏览器的开发者工具中打开JavaScript控制台,以查看有关此内容的错误消息。)