Readit News logoReadit News
taylorgibson · 2 months ago
Does anyone know why Google doesn’t adopt something like this in Google Docs / Slides? It’s amazing to me that after all these years Google Docs still has some of the worst equation editing of all word processors. I was hopeful when they added markdown support that first class equation editing was near, but it’s been a while now and still nothing.
Lord-Jobo · 2 months ago
Speculation: Google has a moderate amount of “core” applications that are clearly getting indefinite support, but all of those services also have a very conservative feature and update roadmap. New features are going to be limited to things that alphabet has in its global focus, so crap like Gemini and not much else.

I’m sure engineers working on products like the google web suite would love to implement this kind of thing but have zero authorization or resources for that.

Experimental applications, the ones that bloom rapidly and get shut down in a cycle that google has become known for, are ironically way more likely to see this kind of cool niche update.

Twisted company has a whacky way of managing their products, because advertisement drives their revenue so everything else is just freestyle jazz.

drob518 · 2 months ago
"Freestyle jazz" is pretty accurate, IMO.
apwheele · 2 months ago
This is very obnoxious when transferring documents from Gemini to google docs (and not just math, tables/code sections are often not transferred correctly as well).

I have a javascript hack from the dev console where I can at least print the chat to PDF, https://andrewpwheeler.com/2025/08/28/deep-research-and-open... (that at least worked 2 months ago)

esafak · 2 months ago
If only they'd added it in the first iteration when they had a free hand.
susam · 2 months ago
I switched from MathJax to KaTeX earlier this year for my blog. So far, it has been working out well.

The only feature I really missed was the ability to use \label and \eqref for equation referencing, since KaTeX doesn't support these commands [1]. I worked around this limitation with a small custom setup defining my own \label and a custom \eqnref (not exactly \eqref though) [2].

Another thing that bothered me a little was that the KaTeX autorender extension does not recognise \begin{align*}, \begin{alignat*}, etc. as top-level delimiters by default [3] but this was trivial to fix by customising the set of default delimiters [2].

I know KaTeX supports server-side rendering but I don't use that yet [4]. I still use client-side rendering. Despite that my maths pages [5][6] render quickly since they are usually small, with only a single reflow from the initial load to the rendered page, without the continual reflows or jitter I used to see with MathJax. Overall, I am quite happy with the switch from MathJax to KaTeX.

[1] https://katex.org/docs/supported.html

[2] https://github.com/susam/susam.net/blob/0.3.0/layout/include...

[3] https://katex.org/docs/autorender#api

[4] https://news.ycombinator.com/item?id=44615271

[5] https://susam.net/mutually-attacking-knights.html

[6] https://susam.net/zigzag-number-spiral.html

smohare · 2 months ago
I’ve never been able to switch since the feature set, whenever I’ve looked over the years, doesn’t seem geared toward serious mathematical exposition. I think I want to carry over habits from papers to blog pages though, which perhaps is misguided.
stared · 2 months ago
As a very much work-in-progress, yesterday, I started working on interactive equations https://p.migdal.pl/equations-explained-colorfully/ (it uses KaTeX under the hood).

The idea is similar to https://betterexplained.com/articles/colorized-math-equation..., but with mouseover interaction (both for further description, but also for accessibility). For a deeper dive in the topic of explorable explanations, I wrote https://p.migdal.pl/blog/2024/05/science-games-explorable-ex... (was here on the HN as well).

sleepyams · 2 months ago
This is really awesome! I've been really interested in creating an interactive introduction to basic algebra where parts of the equation can be manipulated using drag-and-drop, but I couldn't really figure out the best way to do it. Maybe using Katex is the way to go?
subset · 2 months ago
I think the latest version of MathJax (v4) has rendering speed comparable to, if not faster than, KaTeX. It also looks (subjectively) significantly better than KaTeX, and supports a wide array of accessibility features.
silverwind · 2 months ago
MathJax does not even let you select text, so it seems less accessible to me.
mkl · 2 months ago
MathJax lets you select text more often than KaTeX as far as I can tell (some KaTeX formulas act dead unless you start selecting outside them), not that either library give you anything especially useful if you try to copy and paste. MathJax will happily give you useful copy-to-clipboard if you right click.

MathJax has way more accessibility features: https://docs.mathjax.org/en/latest/basic/accessibility.html

xigoi · 2 months ago
Also see Temml, a fork of KaTeX that compiles to MathML instead of styled HTML.

https://temml.org/

sureglymop · 2 months ago
I wish there was a native version of this. Every SSG seems to have the problem of having to depend on node in order to prerender html for math with katex.
koito17 · 2 months ago
I've been using katex-rs, a Rust rewrite, to implement LaTeX rendering for a Rust web app. It was easy enough to hook into pulldown_cmark, so that $ and $$ and render a decent subset of LaTeX. Since pulldown_cmark is a proper Markdown parser, you listen for Event::InlineMath and Event::DisplayMath then call KaTeX directly. No regex or HTML escaping necessary. In my web app, this is all encapsulated into a single function that I can call within Tera templates. It's as SSR as it gets; no Node.js or client-side JavaScript necessary.

The costliest asset is a minified stylesheet served through a CDN. (I do this out of laziness, and because the web app as-is needs nothing more than the standard Rust toolchain).

https://github.com/katex-rs/katex-rs

nicoburns · 2 months ago
Do you have a reference on how to hook it into pulldown_cmark? I'd love to add math support into to my markdown rendering app but I haven't had time to investigate this myself yet.
MillironX · 2 months ago
Hugo includes native KaTeX: https://gohugo.io/functions/transform/tomath/

The docs recommend setting up KaTeX CSS (which requires either a CDN link or Node), but by changing output to 'mathml,' you can have the browser render equations with zero dependencies.

sureglymop · 2 months ago
That's news to me! The last time I used Hugo it didn't support that yet and I had to serve the js bundle to run in the browser.
generichuman · 2 months ago
If your use case is generating html, MathML is supported in all modern browsers: https://developer.mozilla.org/en-US/docs/Web/MathML#browser_...
rustybolt · 2 months ago
I use it in my static site generator in Python via https://github.com/rubenvannieuwpoort/PyKaTeX.

Disclaimer: I am the author of PyKaTeX.

notpushkin · 2 months ago
Port it? Or maybe bundle a tiny interpreter instead of Node.
creata · 2 months ago
It may or may not be as fast, but MathJax has broader support for LaTeX features, better accessibility features, and has slightly better typography in my very subjective opinion, and that's more important to me than a bit of rendering time.
stared · 2 months ago
I am curious, if there is any library for inline formula like KaTeX, but supporting Typst syntax?
runarberg · 2 months ago
I wrote a library with a syntax similar to Typst (actually inspired by AsciiMath; and predates Typst by about a decade). Then there are Markdown-It plugins around it.

https://mathup.xyz/

https://github.com/runarberg/markdown-it-math

jeremyscanvic · 2 months ago
I would assume you pretty much get that out of the box given Typst compiles to HTML natively?
stared · 2 months ago
I was more looking for things I can use with blogs with Markdown and frameworks like Astro.

But with the development of Typst, maybe the way to go is to use Typst rather than Markdown.

sprinkly-dust · 2 months ago
Currently that feature is unsupported or I just can't figure out how to do it. With the latest compiler version 0.14 any .typ file I try to compile will incur warnings about skipping the equations (skipping the main reason I'd want to compile a Typst file to HTML...).

As per their GitHub they haven't included MathJax or KaTeX support yet as they were more focused on semantic and structural accuracy of HTML output with this release.