为什么我在github上的jekyll网站不能使用mathjax?

时间:2016-09-12 02:32:02

标签: github jekyll mathjax

我开始在BLOG之后在github上构建一个jekyll网站。

好的确有效。changkaizhao.github.io

我想在我的博客中添加一些数学内容,我添加一个" mathjax.html"在"包含文件夹"

<script type="text/x-mathjax-config">
      MathJax.Hub.Config({
      TeX: {
                equationNumbers: {
                            autoNumber: "AMS"
                                  }
           },
      tex2jax: {
                inlineMath: [ ['$','$'],
                            ['\(', '\)'] ],
                displayMath: [
                            ['$$','$$'] ],
                processEscapes:true,
               }
                 });

然后将此文件包含在Layouts文件中(default.html page.html post.html)

    <div class="wrapper-footer">
      <div class="container">
        <footer class="footer">
          {% include svg-icons.html %}
        </footer>
      </div>
   </div>
      {% include analytics.html %}
 </body>
  </html>
 {% include mathjax.html %}

default.html中

---
layout: default
---
{% include mathjax.html %}

<article class="page">

<h1>{{ page.title }}</h1>

<div class="entry">
  {{ content }}
</div>
</article>

page.html中

---
layout: default
---
<article class="post">
 <h1>{{ page.title }}</h1>

 <div class="entry">
  {{ content }}
 </div>

 <div class="date">
   Written on {{ page.date | date: "%B %e, %Y" }}
 </div>
  {% include disqus.html %}
 </article>
 {% include mathjax.html %}

post.html

并在帖子文件中添加此行

$$ sin(x^2) $$

结果,页面显示什么...... 它有什么问题?

0 个答案:

没有答案