katex-rs
katex-rs copied to clipboard
`katex` built with`duktape` failed to render `vmatrix` correctly
If I use katex with:
katex = { version = "0.4.5", default-features = false, features = ["duktape"] }
then, matrix expressions like
\begin{vmatrix}a&b\\c&d\end{vmatrix}
results in an error:
JsExecError("undefined not callable (property 'fill' of [object Array]): JavaScript runtime error (TypeError)")
See this issue on mdbook-katex for more.
There is no much I can do in term of issues in the JS engine.
The biggest problem of this crate is that there currently lacks of a well-maintained embedded JS engine (incl. its corresponding Rust binding). See #6 for more details.
What is your take of requiring the user to have other dependencies such as node or even katex CLI?
If you don't mind the dependency's size, V8 engine using rusty_v8 is the best approach. PR is welcomed to add this new backend.
Noted that node uses V8 engine internally.
I don't like the idea of embedding V8… It is quite an overkill for the simple functionality katex is supposed to provide.
What I was suggesting is that we call command npx katex or something like that.