# Mathematics Inline and block formulas rendered with KaTeX. ## Installation ```bash npx shadcn@latest add litingyes/blocove/rich-text-editor-mathematics ``` > Typography requires [shadcn/typeset](https://ui.shadcn.com/docs/typeset). Copy `typeset.css` next to your main stylesheet, import it after Tailwind and add the `.typeset-docs` preset. KaTeX renders the formulas, so the stylesheet has to be available. Without it the document still parses and the nodes stay editable, but the formulas render unstyled. ## Usage ### Install the KaTeX stylesheet ```css /* src/styles.css */ @import "katex/dist/katex.min.css"; ``` ## API Reference ### EditorMathematics Registers the KaTeX backed inline and block math nodes. Options pass through to the Mathematics extension. | Prop | Type | Default | | --- | --- | --- | | `inlineOptions` | `Omit` | - | | `blockOptions` | `Omit` | - | | `katexOptions` | `KatexOptions` | - | ### EditorMathematicsToolbar Toolbar control that inserts an inline or a block formula from a LaTeX source. | Prop | Type | Default | | --- | --- | --- | | `className` | `string` | - | ## Registry dependencies - `litingyes/blocove/rich-text-editor` - `litingyes/blocove/rich-text-editor-extension` - `button` - `input` - `popover` Namespace: `npx shadcn@latest add @blocove/rich-text-editor-mathematics`