feat: Latex support (#929)

* feat: implement LaTeX math rendering via KaTeX

- Add katex, remark-math, and rehype-katex dependencies
- Integrate KaTeX CSS with light/dark theme color overrides
- Wire remark-math and rehype-katex plugins into MarkdownRenderer
- Support inline ($...$) and display ($$...$$) math delimiters
- Add plan and task documentation

* fix(katex): display inline error messages for invalid LaTeX

- Configure rehypeKatex with throwOnError: false to render errors inline
- Use destructive color var for error text
- Update feature documentation with verification results

* chore: remove latex PR artifacts and hardcoded color fallback

---------

Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
This commit is contained in:
ricautomation
2026-04-16 23:30:52 +03:00
committed by GitHub
co-authored by Bohdan Triapitsyn
parent 2fbfd803f7
commit 324cf49755
4 changed files with 72 additions and 2 deletions
+3
View File
@@ -67,8 +67,11 @@
"heic2any": "^0.0.4",
"html-to-image": "^1.11.13",
"http-proxy-middleware": "^3.0.5",
"katex": "^0.16.21",
"marked": "^17.0.3",
"morphdom": "^2.7.7",
"rehype-katex": "^7.0.1",
"remark-math": "^6.0.0",
"motion": "^12.23.24",
"next-themes": "^0.4.6",
"prismjs": "^1.30.0",