rspress-plugin-katex
v0.3.0
Published
Rspress plugin to render math with KaTeX
Downloads
33
Readme
rspress-plugin-katex
Rspress plugin to add support for rendering math equations using KaTeX.
```math
% \f is defined as #1f(#2) using the macro
\f\relax{x} = \int_{-\infty}^\infty
\f\hat\xi\,e^{2 \pi i \xi x}
\,d\xi
```
import * as path from 'path';
import { defineConfig } from 'rspress/config';
import mermaid from './src';
export default defineConfig({
root: path.join(__dirname, 'docs'),
plugins: [
mermaid({
macros: {
'\\f': '#1f(#2)',
},
}),
],
});
Usage
npm i rspress-plugin-katex
pnpm add rspress-plugin-katex
import * as path from 'path';
import { defineConfig } from 'rspress/config';
import katex from 'rspress-plugin-katex';
export default defineConfig({
root: path.join(__dirname, 'docs'),
plugins: [katex()],
});
Configure
See KaTeX documentation for more details.