返回 slidev
config-katex.md
根目录 / docs / custom / config-katex.md
1 # Configure KaTeX
2
3 <Environment type="node" />
4
5 Create `./setup/katex.ts` with the following content:
6
7 ```ts twoslash [setup/katex.ts]
8 import { defineKatexSetup } from '@slidev/types'
9
10 export default defineKatexSetup(() => {
11 return {
12 maxExpand: 2000,
13 /* ... */
14 }
15 })
16 ```
17
18 The return value should be the custom options for KaTeX. Refer to [KaTeX's documentation](https://katex.org/docs/options.html) or the type definition for the full options list.
19
19 lines MARKDOWN