markdown-math-rendering
Installation
SKILL.md
Markdown + math + code in React
Packages: react-markdown, remark-gfm, remark-math, rehype-katex, rehype-raw, katex, react-syntax-highlighter.
"use client";
import ReactMarkdown from "react-markdown";
import remarkGfm from "remark-gfm";
import remarkMath from "remark-math";
import rehypeKatex from "rehype-katex";
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
import { oneDark } from "react-syntax-highlighter/dist/esm/styles/prism";
import "katex/dist/katex.min.css"; // required or math renders unstyled