-
Notifications
You must be signed in to change notification settings - Fork 442
feat(gnoweb): math extension #4879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
🛠 PR Checks Summary🔴 Changes related to gnoweb must be reviewed by its codeowners Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🟢 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
feat: Add MathML extension for gnoweb markdown
This PR adds a comprehensive MathML extension (
ext_math) to gnoweb's markdown rendering system, enabling full server-side LaTeX support with MathML output (native browser ext: no need for a front-end plugin or image generation).Features
Mathematical Expression Support
$E = mc^2$→ Rendered as MathML$$ \int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi} $$→ Rendered as MathML\(...\)and\[...\]supportComprehensive LaTeX Support
\alpha,\beta,\gamma,\Delta,\Omega, etc.\times,\div,\pm,\leq,\geq,\neq,\approx\sin,\cos,\tan,\log,\ln,\exp,\max,\min\int,\sum,\prod,\lim\in,\notin,\subset,\supset,\cup,\cap,\emptyset\land,\lor,\lnot,\forall,\exists\rightarrow,\leftarrow,\Rightarrow,\Leftarrow\begin{matrix}...\end{matrix},\begin{pmatrix}...\end{pmatrix}\frac{numerator}{denominator}x^2,x_1,x^{2+3},x_{i+1}\sqrt{x},\sqrt[n]{x}Implementation Details
Parser Integration
MathInline,MathBlock)$...$,$$...$$,\(...\),\[...\]MathML Generation
Screenshot
PS: This library is based on TreeBlood (originally by Wyatt915) and has been updated and fixed for our gnoweb needs.