# A6. 基于 LATEX 的数学公式

# 1.配置

在你的VuePress项目中安装插件:

yarn add -D markdown-it
yarn add -D markdown-it-mathjax3
1
2

然后修改配置文件.vuepress/config.js:

// .vuepress/config.js
module.exports = {
    extendMarkdown: (md) => {
      md.use(require('markdown-it-mathjax3')),
      md.linkify.set({ fuzzyEmail: false })
    },
}
1
2
3
4
5
6
7

# 2.使用

  • 行内模式 $x = \sin(t)$
  • 公式模式
$$
x^2 = y^2 + x^2
$$
1
2
3

# 3. 范例

This is an inline formula: x=sinωt. The following is display formula (numbered formula):

(3.0)O=[000000000]

This is anothor numbered formula:-

(3.1)x˙=f(x,u,t)

Below is a complex equation:

(3.2)rωr(yωω)=(yωω){(logy)r+i=1r(1)ir(ri+1)(logy)riωi}