Hey, I see the screenshot. This is a known renderer limitation in Cursor.
Cursor only supports LaTeX with specific delimiters:
Inline math: \(...\)
Block math: \[...\] or $$...$$
Standard $...$ for inline math is intentionally not supported because it can conflict with the dollar sign. When the model outputs formulas using $...$, the renderer won’t recognize them, and * and _ inside formulas can accidentally trigger italic formatting. That’s why you see the “garbage” in the screenshot.
Workaround: add an instruction in .cursorrules to make the model use \(...\) instead of $...$ for inline math. Something like:
When writing mathematical formulas, always use \(...\) for inline math and \[...\] for block math. Never use $...$ notation.
The team knows this limitation gets in the way. Here’s the main thread for this feature request: LaTeX rendering in chat