Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

katex built withduktape failed to render vmatrix correctly #12

Open
SichangHe opened this issue Nov 24, 2022 · 5 comments
Open

katex built withduktape failed to render vmatrix correctly #12

SichangHe opened this issue Nov 24, 2022 · 5 comments
Labels
upstream Upstream issue

Comments

@SichangHe
Copy link

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.

@xu-cheng xu-cheng added the upstream Upstream issue label Nov 24, 2022
@xu-cheng
Copy link
Owner

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.

@SichangHe
Copy link
Author

What is your take of requiring the user to have other dependencies such as node or even katex CLI?

@xu-cheng
Copy link
Owner

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.

@xu-cheng
Copy link
Owner

Noted that node uses V8 engine internally.

@SichangHe
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Upstream issue
Projects
None yet
Development

No branches or pull requests

2 participants