Markdown Math
约 98 字小于 1 分钟
2024-09-24
概述
为 Markdown 添加数学支持。
关联插件:@vuepress/plugin-markdown-math
此插件允许你使用 mathjax 或 katex 在 Markdown 中渲染 TEX 内容。
配置
插件默认启用 katex
。
.vuepress/config.ts
import { defineUserConfig } from 'vuepress'
import { plumeTheme } from 'vuepress-theme-plume'
export default defineUserConfig({
theme: plumeTheme({
markdown: {
math: {
type: 'katex',
}
},
// 也可以在 `plugins.markdownMath` 中进行配置,但不推荐
plugins: {
markdownMath: {}
}
}),
})