Publish.jl
Publish.jl copied to clipboard
KaTeX JS not included by default
None of the math blocks are rendered using KaTeX in my deployed page (see below). Is the JS loaded by default, or is there something required on my part? I see the resulting HTML is wrapped in <div class="math">
.

There's no included math rendering lib in the HTML output at the moment. I'm happy to have one included by default, KaTeX is probably the best default to use.
It seems like KaTeX expects the class "katex"
, but the markdown generates the classes "math"
and "display-math"
.
Never mind, it seems as though that is irrelevant for rendering.
It seems like KaTeX expects the class "katex", but the markdown generates the classes "math" and "display-math".
Yup, the markdown->html rendering is meant to be reasonably agnostic with respect to the libraries you end up using in the final document, so you have to point katex to the specific nodes with classes math and display-math.
Currently there's some implementation code in https://github.com/MichaelHatherly/PublishThemes/blob/master/themes/default/html_doc.mustache which is used for the (currently) undocumented self-contained html_doc
output format. I just need to port over that katex stuff to the main html
theme as well.
Yeah using the event listener is the approach I ended up using too.
Hi all, can someone ELI5 how to activate the KaTeX rendering for HTML output using [email protected]
? Passing html_doc
to serve
throws an error.