Typecho joe主题添加 MathJax.js支持
侧边栏壁纸
  • 累计撰写 2 篇文章
  • 累计收到 1 条评论

Typecho joe主题添加 MathJax.js支持

wyj3931
2022-12-14 / 0 评论 / 4 阅读 / 正在检测是否收录...

在主题目录/usr/themes/Joe/public/footer.php中添加以下代码

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX", "output/HTML-CSS"],
    tex2jax: {
      inlineMath:  [ ["$", "$"],  ["\(","\)"] ],
      displayMath: [ ["$$","$$"], ["\[","\]"] ],
      processEscapes: true
    },
    "HTML-CSS": { availableFonts: ["TeX"] }
  });
</script>
<script type="text/javascript"
   src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js">
</script>
0

评论 (0)

取消