Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

MathJax is more complete than KaTeX and it is supported on GitHub Pages, see also https://g14n.info/2014/09/math-on-github-pages/


It's also a lot heavier and slower. Unless you need extra features that katex doesn't support it's best to use the latter.


It’s not “supported on GitHub Pages” in any specific way. Both engines can work client-side by scanning your HTML for LaTeX code enclosed in $$…$$ or \(…\) or other configurable delimiters. You can just drop the appropriate JS/CSS into your default layout, and you don’t need any special support from Jekyll for this to work. Kramdown can be configured with a math backend, and the only thing it will do in MathJax mode is replace $$…$ with \(…\) and \[…\] depending on the environment, and not parse escapes and Markdown syntax in that snippet. The KaTeX mode of kramdown does stuff server-side, which might not be desirable on GitHub Pages — but this is fixable by just telling Kramdown you’re using MathJax, and including KaTeX with auto-render in your templates.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: