tejasprabhune / kern
PublicA fast, zero-dependency JavaScript library that renders Typst math syntax to HTML/CSS/MathML in the browser. Drop-in alternative to KaTeX for projects that prefer Typst's cleaner math syntax.
Kern is a JavaScript library that renders mathematical equations beautifully on websites. It uses Typst's cleaner math syntax as an alternative to traditional LaTeX, making it much easier to write fractions, square roots, matrices, and complex equations. The library works directly in web browsers with no extra setup required—just add two lines to your page and start writing math in a natural, readable format. It produces both visual HTML/CSS output and accessible MathML for screen readers, making it suitable for educational content, academic blogs, and technical documentation.
How It Works
You're building a website, blog, or educational app and want to display beautiful mathematical equations without the headache.
Instead of wrestling with complex LaTeX commands, you find kern—a library that lets you write math in a cleaner, more natural style.
You copy two lines to your HTML—a stylesheet and a script—and kern is ready to use instantly.
Instead of \frac{a}{b}, you simply write frac(a, b). Instead of \sqrt{x}, you write sqrt(x). It reads like you think.
Wrap expressions in single dollar signs for math that flows naturally within your sentences.
Use double dollar signs for equations that deserve their own centered space, like theorem statements.
Your equations render crisp and beautiful, working in any browser with proper accessibility support through MathML.
Students, researchers, and visitors to your site enjoy perfectly rendered equations without any extra effort from you.
Star Growth
Repurpose is a Pro feature
Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.
Unlock RepurposeSimilar repos coming soon.