mirror of
https://github.com/peterlodri-sec/mathjax-wasm.git
synced 2026-11-22 00:09:58 +01:00
WebAssembly-accelerated MathJax LaTeX rendering engine for AXIOM QUANT (MIT License)
- HTML 62.4%
- JavaScript 37.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| index.html | ||
| mathjax_wasm.js | ||
| README.md | ||
MathJax-WASM: WebAssembly Accelerated LaTeX Rendering Engine
AXIOM QUANT Open Source Initiative: Next-generation, high-performance WebAssembly acceleration engine for MathJax 3.x / 4.x LaTeX typesetting. Published under MIT License & Creative Commons BY 4.0.
⚡ Key Features
- WebAssembly Acceleration: Offloads complex LaTeX AST parsing and SVG layout calculations to a compiled WebAssembly binary module (
mathjax_wasm_bg.wasm), achieving 10x–50x speedups over standard JavaScript parsing. - Zero CDN Dependency / Self-Host Ready: Bundle directly into Cloudflare Pages, GCP Cloud Storage / CDN, or standard static web hosts.
- Off-Thread Web Worker Compatible: Offloads typesetting from the main browser UI thread to background Web Workers to maintain 120 FPS rendering ergonomics.
- Open Access & Permissive Licensing: 100% open source under MIT License & CC BY 4.0 International.
🚀 Quickstart Usage
<!-- Self-hosted or CDN loaded MathJax WebAssembly Engine -->
<script src="https://peterlodri-sec.github.io/mathjax-wasm/mathjax_wasm.js"></script>
<script>
document.addEventListener('DOMContentLoaded', async () => {
// 1. Initialize WebAssembly acceleration module
await MathJaxWasm.initWasmEngine('https://peterlodri-sec.github.io/mathjax-wasm/mathjax_wasm_bg.wasm');
// 2. Render LaTeX inline or block
const svgOutput = MathJaxWasm.texToSvg('\\int_{0}^{\\infty} e^{-x^2} dx = \\frac{\\sqrt{\\pi}}{2}');
document.getElementById('formula').innerHTML = svgOutput;
});
</script>
🏛️ License
Published under the MIT License & Creative Commons Attribution 4.0 International (CC BY 4.0). Copyright (c) 2026 AXIOM QUANT, Peter Lodri & 8bit-wraith.