Use <Math> with a literal LaTeX expression. It supports the KaTeX math subset and reports invalid expressions during the build.
Energy is <Math expression="E=mc^2" />.
<Math display expression="c^2=a^2+b^2" />
Energy is .
expression is required and nonempty. Add the bare display attribute on a block element for centered display math. The component does not parse dollar delimiters in ordinary prose or code fences. Escape quotes in MDX attributes as needed.
HTML, Markdown, and agents
HTML contains build-time MathML with the source expression as an annotation. The expression remains available to assistive technology without client JavaScript. Markdown keeps inline expressions as code and display expressions in a latex code block. An agent can read the original LaTeX in either form. Check complicated notation with the screen readers your readers use.