YuhuanStudioYunUIDocs
Content

Math Renderer

Render LaTeX with KaTeX, inline or as a centered block; requires the KaTeX stylesheet.

Render a LaTeX expression with KaTeX. Pass the expression as math; set block for a centered, display-style equation, or leave it off for inline math that flows with the surrounding text. InlineMath and BlockMath are thin convenience wrappers that take a value prop. Inside MarkdownRenderer, $…$ and $$…$$ are rendered through this component automatically.

Import

tsx
1import { MathRenderer, InlineMath, BlockMath } from "@yuhuanowo/yunui/content";

Requires katex/dist/katex.min.css to be imported by the host app.

Example

MathRenderer

Inline: the quadratic formula is for .

Props

PropTypeDefaultDescription
blockbooleanfalse
classNamestring
math*string

On this page