WordPress+markdown+latex数学公式写作
WordPress+markdown+latex数学公式写作

WordPress+markdown+latex数学公式写作

wordpress Markdown插件

Markdown插件选择的是WP Githuber MD

数学公式写作

为了在网页上更好的展示数学公式,我采用的方法是在主题编辑器中的 (header.php) 文件中在 <\head> 之前加入以下代码

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

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

latex公式编写注意事项

  1. 当需要输入$x_{min}$这样,在下标中有多个字符时,编写代码如下所示

    $x\_{min}
  2. 当需要引入*这个字符时,请务必在前面加上转义字符 \

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注