Doctave / doctave

A batteries-included developer documentation site generator
https://cli.doctave.com
MIT License
566 stars 32 forks source link

Add support for rendering mathematical notation #14

Closed begleynk closed 2 years ago

begleynk commented 3 years ago

Like mdbook and others, we should add support for mathematical notation.

MathJax seems like it could be a good option. It could be integrated similarly to how we do with MermaidJS - bundle the minified JS in the binary and serve it.

Discussion found here: https://www.reddit.com/r/rust/comments/qpeblj/comment/hjuxq5d/

begleynk commented 3 years ago

One issue with MathJax seems to be that it requires a polyfill library to also be loaded for browser compatibility. This is required even for IE 11 support. Details here.

Perhaps Katex could be a more lightweight option? It's around ~250kb minified and is self contained.

pdunne commented 2 years ago

good point, I forgot that my quick test was with Katex (it almost displayed correctly)