Back to Slidev

Configure KaTeX

docs/custom/config-katex.md

52.15.1459 B
Original Source

Configure KaTeX

<Environment type="node" />

Create ./setup/katex.ts with the following content:

ts
import { defineKatexSetup } from '@slidev/types'

export default defineKatexSetup(() => {
  return {
    maxExpand: 2000,
    /* ... */
  }
})

The return value should be the custom options for KaTeX. Refer to KaTeX's documentation or the type definition for the full options list.