top | item 24745013

(no title)

fibo | 5 years ago

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

discuss

order

esperent|5 years ago

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.

Kwpolska|5 years ago

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.