mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2974] [CLOSED] [GUI] Render chat math with bundled KaTeX #4371
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4371
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2974
Author: @CC-David-CC
Created: 10/17/2026
Status: ❌ Closed
Base:
main← Head:feat/web-math-katex-minimal📝 Commits (2)
0abb109web: add shared source-preserving math core9392cdcweb: render chat math with bundled KaTeX📊 Changes
31 files changed (+229 additions, -4 deletions)
View changed files
➕
docs/WEB_MATH_INTERFACE.md(+16 -0)📝
serve/server.py(+18 -0)📝
serve/web/app.css(+8 -0)📝
serve/web/app.js(+18 -4)📝
serve/web/index.html(+4 -0)➕
serve/web/math-adapter.js(+22 -0)➕
serve/web/math.js(+113 -0)➕
serve/web/vendor/katex/LICENSE(+21 -0)➕
serve/web/vendor/katex/PROVENANCE.json(+7 -0)➕
serve/web/vendor/katex/dist/fonts/KaTeX_AMS-Regular.woff2(+0 -0)➕
serve/web/vendor/katex/dist/fonts/KaTeX_Caligraphic-Bold.woff2(+0 -0)➕
serve/web/vendor/katex/dist/fonts/KaTeX_Caligraphic-Regular.woff2(+0 -0)➕
serve/web/vendor/katex/dist/fonts/KaTeX_Fraktur-Bold.woff2(+0 -0)➕
serve/web/vendor/katex/dist/fonts/KaTeX_Fraktur-Regular.woff2(+0 -0)➕
serve/web/vendor/katex/dist/fonts/KaTeX_Main-Bold.woff2(+0 -0)➕
serve/web/vendor/katex/dist/fonts/KaTeX_Main-BoldItalic.woff2(+0 -0)➕
serve/web/vendor/katex/dist/fonts/KaTeX_Main-Italic.woff2(+0 -0)➕
serve/web/vendor/katex/dist/fonts/KaTeX_Main-Regular.woff2(+0 -0)➕
serve/web/vendor/katex/dist/fonts/KaTeX_Math-BoldItalic.woff2(+0 -0)➕
serve/web/vendor/katex/dist/fonts/KaTeX_Math-Italic.woff2(+0 -0)...and 11 more files
📄 Description
Problem and result
Enable Render math in Chat settings to display inline and block equations using bundled KaTeX. Original source remains available for copy, export, persistence and API requests.
Related discussion
Depends on #2972. Related: #1830. Alternative renderer: #2975.
Approach
Rebase the shared math core onto upstream main and layer the KaTeX 0.19.0 adapter and required local assets on top. Load assets only when enabled, use no CDN, and fall back to source for invalid input.
Validation
Passed:
90767252f; tested head9392cdca6. Range-diff confirms the original patches are unchanged;git diff --check upstream/mainpassed.python test_browser.py --browser chromium; python test_browser.py --browser firefox; python test_browser.py --browser webkit; python verify_vendor.py. Renderer screenshots inspected where applicable.Failed:
Not run:
Limits
Depends on the shared core in #2972. KaTeX and MathJax are alternative adapters; these branches are tested independently.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.