Markdown Math
About 197 words
Overview
Adds mathematical formula support for Markdown.
Related plugin: @vuepress/plugin-markdown-math
This plugin allows you to render TEX content in Markdown using MathJax or KaTeX.
Configuration
- Type:
false | MarkdownMathPluginOptions - Default:
{ type: 'katex' }
The plugin enables katex by default; set it to false to disable it.
.vuepress/config.ts
import { defineUserConfig } from 'vuepress'
import { plumeTheme } from 'vuepress-theme-plume'
export default defineUserConfig({
theme: plumeTheme({
markdown: {
math: {
type: 'katex',
}
},
}),
})For configuration entry priority information, please refer to Plugin Configuration Entry.
Configuration Options
type
- Type:
'katex' | 'mathjax' - Default:
'katex' - Details: The math formula renderer.
mathjaxis more feature-complete but larger in size, whilekatexis faster
copy
- Type:
boolean - Default:
false - Details: Whether to enable formula copy. Only available when
type: 'katex'
mhchem
- Type:
boolean - Default:
false - Details: Whether to enable the mhchem chemical formula extension. Only available when
type: 'katex'
Other options
Besides the options above, the rendering options of katex / mathjax are passed through to the corresponding underlying implementation. See @mdit/plugin-katex and @mdit/plugin-mathjax.
