HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
pshihn
math-ml
TypeScript2018–2025
pshihn / math-ml

math-ml

MathML implementation using custom elements

2Distinct people
6Mentions
0Explicit recommenders
80GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

MathML implementation using custom elements

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year6 dated mentions

Observed mentions: 2018-11-05 20:06:58 UTC to 2025-12-04 16:20:07 UTC.

01232018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC110
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC303

What Hacker News says

6 sources
I get the feeling that MathML will win out, simply because Firefox supported from early on [1], there is first move advantage. I use an old JS library for backwards compatibility [2] that adds just enough support for any math I'm math'in [3]. I would still prefer SVG, but it ended up being a pain to implement reliably. One thing I noticed about this site though is that it is laggy - and I have a pretty good system. [1] https://caniuse.com/mathml [2] https://coffeespace.org.uk/projects/mathml-render.html [3] https://github.com/pshihn/math-ml
In Interop and MathML Core
Same here [1], I chose MathML as it worked out of the box in some browsers at the time. For browsers not supporting MathML I also have this ~80kB (~12kB compressed) library for converting it [2]. I tested your equation: \def\d{\mathrm{d}} \oint_C \vec{B}\circ \d\vec{l} = \mu_0 \left( I_{\text{enc}} + \varepsilon_0 \frac{\d}{\d t} \int_S {\vec{E} \circ \hat{n}}\; \d a \right) It could not do the definition, so it ended up being: $$\oint_C \vec{B}\circ \mathrm{d}\vec{l} = \mu_0 \left( I_{\text{enc}} + \varepsilon_0 \frac{\mathrm{d}}{\mathrm{d} t} \int_S {\vec{E} \circ \hat{n}}\; \mathrm{d} a \right)$$ I did previously also load the LaTeX equation font, but I decided it used a lot of resource for little gain in the end. I was also looking at your r
Read the rest
ecent blog [3], and one thing that I like about mine is that the code you see is what is run to produce the output [4]. I am in the middle of making the code interactive too, so that you can re-compile it within the web page and run different parameters to produce different outputs. [1] https://coffeespace.org.uk/projects/mathml-render.html [2] https://github.com/pshihn/math-ml [3] https://sathomas.me/blog/robuststats/ [4] https://coffeespace.org.uk/projects/wavefront-algorithm.html
In Offline Math: Converting LaTeX to SVG with MathJax
One problem I ran into a long time ago (2021) is that MathML was not well supported in Chrome and other browsers, but seemed well supported in Firefox. After trying many Pandoc options [1] I ended up selecting a very small implementation by Preet [2] which was some ~70kB [3] compared to other implementations at about 10x (i.e. MathJax [4]). I use it with the Polyfill to check if it is already supported. If you checkout the torture test, it really performs quite well [5]. In the future I still want to convert to SVG vectors (with bitmap backups) and include those instead, but I'm not yet pleased with the offerings. My concern with JS is that it seems to be on the way out, I think it will eventually go the way of Flash in favour of something else. With the current solutions for rendering equations you either have this ridiculous wrapper aro
Read the rest
und LaTeX or similar, or some other weirdness. If I get bored for a few days I might end up writing a parser to convert MathML to such outputs. It shouldn't take insane efforts to pass some torture tests. [1] https://coffeespace.org.uk/projects/mathml-render.html [2] https://github.com/pshihn [3] https://github.com/pshihn/math-ml [4] https://www.mathjax.org/ [5] https://pshihn.github.io/math-ml/examples/torture.html
In MathML with Pandoc
Depending on your goal, I quite like using pandoc [1] for rendering math in HTML. I can write something like: Equation: $$x=\frac{1}{2}$$ Unfortunately there is no common in-browser Math rendering and as the referenced article points out, pictures of equations are not the solution [2]. A common mathematics rendering format is desperately needed but nobody really seems motivated to solve it. My approach is to use MathML that is rendered natively by Firefox and use JS to render in other browsers [3]. MathJax is way too heavy the last time I checked (growing towards 1MB) [4]. Instead I use math-ml, a JS library that is somewhat complete/abandoned but mostly works in about 80kB [5]. My rational for supporting Firefox's approach is that it's the browser I use, MathML is supported by W3C [6], MathML is supported by pandoc and ther
Read the rest
In Convert LaTeX notation to ready to be embedded Markdown

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.