rspress-plugin-katex
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

rspress-plugin-katex NPM Version

简体中文

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)',
      },
    }),
  ],
});
sample

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.

Readme

Keywords

Package Sidebar

Install

npm i rspress-plugin-katex

Weekly Downloads

0

Version

0.3.0

License

MIT

Unpacked Size

5.52 kB

Total Files

6

Last publish

Collaborators

  • linbudu