# A6. 基于 的数学公式
# 1.配置
在你的VuePress项目中安装插件:
yarn add -D markdown-it
yarn add -D markdown-it-mathjax3
1
2
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
3
4
5
6
7
# 2.使用
- 行内模式
$x = \sin(t)$
- 公式模式
$$
x^2 = y^2 + x^2
$$
1
2
3
2
3
# 3. 范例
This is an inline formula:
This is anothor numbered formula:-
Below is a complex equation: