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

MathJax on Linkedom.. #478

Open
swamidass opened this issue Feb 7, 2022 · 2 comments
Open

MathJax on Linkedom.. #478

swamidass opened this issue Feb 7, 2022 · 2 comments

Comments

@swamidass
Copy link

Has anyone figured out how to use MathJax on a linkedom object?

There are some tools for applying it to a jsdom (e.g. https://github.com/pkra/mathjax-node-page/), but I'd prefer to use linkedom. https://github.com/WebReflection/linkedom

Linkedom is a much faster alternative to jsdom, https://webreflection.medium.com/linkedom-a-jsdom-alternative-53dd8f699311 , with nearly the same functionality.

I'm hoping to have a way to use Mathjax in a serverside node process on a linkedom object, modifying the dom in place to render the math. Less useful, but also valuable, would be a commandline utility like mjpage to do the same, but using a linkedom object internally for speed.

@dpvc
Copy link
Member

dpvc commented Feb 8, 2022

While it would be possible to do this with mathjax-node, it would take some work. Instead, you should use MathJax v3, as it can be called from node directly (unlike version 2, which is what is used in mathjax-node). See my response to mathjax/MathJax#2833.

@swamidass
Copy link
Author

Thanks!

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

No branches or pull requests

2 participants