"use client"; import katex from "katex"; interface MathDisplayProps { math: string; className?: string; } export function MathDisplay({ math, className }: MathDisplayProps) { const html = katex.renderToString(math, { displayMode: true, throwOnError: false, }); return (
); } export function MathInline({ math, className }: MathDisplayProps) { const html = katex.renderToString(math, { displayMode: false, throwOnError: false, }); return ( ); }