vuepress-plugin-katex
Katex plugin for VuePress (fork by Diogo Correia)
Installation
yarn add -D @diogotc/vuepress-plugin-katex
# or npm install -D @diogotc/vuepress-plugin-katex
Usage
config
module.exports = {
// ...
plugins: {
"@diogotc/katex": {
delimiters: "dollars",
},
},
// or
plugins: {
"@diogotc/vuepress-plugin-katex": {
delimiters: "dollars",
},
},
// ...
};
// or
module.exports = [
["@diogotc/vuepress-plugin-katex", { delimiters: "dollars" }],
// or
["@diogotc/katex", { delimiters: "dollars" }],
];
Options
Delimiters
- type:
string
- default:
dollars
More settings at the markdown-it-texmath
repository.
dollars
example
You can use render latex mathematical expressions KaTeX:
- inline
$\Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt,.$
$\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N$
- display
$$ \Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt,. $$
$$
\Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,.
$$
Vue components
-
Eq.vue
: used for inline KaTeX -
Eqn.vue
: used for block KaTeX
@diogotc/vuepress-plugin-katex
Projects used in
Changelog
v2.0.0: Forked from @maginapp/vuepress-plugin-katex and upgraded dependencies.