Closed deadmorous closed 4 years ago
There's basically two parts to the mathjax support, one is that if you have a .. math::
block then the mathjax JS will be included, and the other is that mathjax is initialized in the templates.
Mathjax does the rest.
A flag that allows you to have a .. math::
block without the mathjax headers, would allow you to use those blocks if you want to, without getting Mathjax included. You could then do a custom template that includes and initializes KaTeX. Does that sound reasonable?
Or you can just not use the .. math::
blocks.. Or point the --mathjax=
I added KaTeX scripts katex.min.js
, contrib/auto-render.min.js
, plus my own one to initialize KaTeX, to the list in the [hovercraft]/js-body
parameter in the template.cfg
file, and used .. math::
blocks in the presentation. I will try to experiment with --mathjax=path/to/KaTeX, as you suggested. If it effectively replaces MathJax with KaTeX, we're done :)
Thank you!
Well, --mathjax=path/to/KaTeX works, but path/to/KaTeX
has to be a directory, so I have to rename katex.min.js
to MathJax.js
. And I have to add katex.min.css
to template.cfg
Then it almost works. The problems are that KaTeX doesn't support the align
environment and its formatted output is severely broken now (have no idea why), although its previous versions worked fine. Seems I'm going back to MathJax :)
Well, sorry to hear that, but yeah, MathJax is going to be the easiest.
I've been using hovercraft for a couple of years for making presentations with LaTeX formulas. Since there was no support for rendering math at that time, I added some scripts to do that. But my choice was KaTeX, rather than MathJax, for some reason. Is it possible to implement an option to choose math rendering engine among MathJax, KaTeX, and probably other hyphotetical engines?