preprocess-katex
is a preprocessor for Svelte which allows you to write math (via KaTeX) directly in Svelte templates without disrupting other tools like svelte-check, Prettier, ESLint, TypeScript, etc.
This package has a corresponding VS Code Extension to provide syntax highlighting.