mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2975] [CLOSED] [GUI] Render chat math with bundled MathJax #4374
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#4374
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/2975
Author: @CC-David-CC
Created: 10/17/2026
Status: ❌ Closed
Base:
main← Head:feat/web-math-mathjax-minimal📝 Commits (2)
0abb109web: add shared source-preserving math core4fba794web: render chat math with bundled MathJax📊 Changes
159 files changed (+685 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(+47 -0)➕
serve/web/math.js(+113 -0)➕
serve/web/vendor/mathjax-newcm-font/LICENSE(+202 -0)➕
serve/web/vendor/mathjax-newcm-font/PROVENANCE.json(+7 -0)➕
serve/web/vendor/mathjax-newcm-font/chtml/dynamic/PUA.js(+1 -0)➕
serve/web/vendor/mathjax-newcm-font/chtml/dynamic/accents-b-i.js(+1 -0)➕
serve/web/vendor/mathjax-newcm-font/chtml/dynamic/accents.js(+1 -0)➕
serve/web/vendor/mathjax-newcm-font/chtml/dynamic/arabic.js(+1 -0)➕
serve/web/vendor/mathjax-newcm-font/chtml/dynamic/arrows.js(+1 -0)➕
serve/web/vendor/mathjax-newcm-font/chtml/dynamic/braille-d.js(+1 -0)➕
serve/web/vendor/mathjax-newcm-font/chtml/dynamic/braille.js(+1 -0)➕
serve/web/vendor/mathjax-newcm-font/chtml/dynamic/calligraphic.js(+1 -0)➕
serve/web/vendor/mathjax-newcm-font/chtml/dynamic/cherokee.js(+1 -0)➕
serve/web/vendor/mathjax-newcm-font/chtml/dynamic/cyrillic-ss.js(+1 -0)➕
serve/web/vendor/mathjax-newcm-font/chtml/dynamic/cyrillic.js(+1 -0)...and 80 more files
📄 Description
Problem and result
Enable Render math in Chat settings to display inline and block equations using bundled MathJax and New Computer Modern fonts. Original text remains intact for copy, export, persistence and API requests.
Related discussion
Depends on #2972. Related: #1832. Alternative renderer: #2974.
Approach
Rebase the shared core onto upstream main and add the MathJax 4.1.3 adapter with local scripts, fonts, licenses and provenance. Load assets only when enabled, use no CDN, and fall back to source on invalid input.
Validation
Passed:
90767252f; tested head4fba794c5. 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. MathJax and KaTeX 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.