Showcase: A 3.5KB zero-dependency TeX-to-MathML compiler for supercharging math rendering in Marked #3988
x-at-01
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
|
If you can create an extension we can add it to our known extensions |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Markdown parsers like Marked are built on speed, simplicity, and extensibility. However, integrating math formulas in markdown has always been challenging because traditional engines (like KaTeX/MathJax) are huge (75KB to 300KB+ JS) and require complex layout calculators that run on the client's main thread.
Why not leverage Native Browser MathML?
Since January 2023 (Chrome 109), all major layout engines (Chromium/Blink, Gecko/Firefox, and WebKit/Safari) natively support MathML Core. Thus, we no longer need heavy client-side layout engines. The parser only needs to translate TeX commands to native
<math>tags, letting the browser's C++ layout engine handle typography.We've built @webc.site/math, an ultra-lightweight math compiler tailored for markdown rendering:
Here's an integration example:
We hope this provides the Marked community with a modern, high-performance option for math equation rendering!
Beta Was this translation helpful? Give feedback.
All reactions