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

Consider moving to Katex #141

Open
Techcable opened this issue Oct 11, 2021 · 6 comments
Open

Consider moving to Katex #141

Techcable opened this issue Oct 11, 2021 · 6 comments

Comments

@Techcable
Copy link

Hi! Have you considered moving to Katex for your math rendering?

It's faster than MathJax and much more lightweight.

I'd be willing to help port this if you're interested 😄

@mmatera
Copy link
Contributor

mmatera commented Oct 11, 2021

I think it worth a try. Do you think this would requiere many changes?

@TiagoCavalcante
Copy link
Collaborator

TiagoCavalcante commented Oct 11, 2021

@mmatera @Techcable currently the "interface" uses XML a lot. MathJax is XML and in the middle of MathJax there are SVGs, images and 3d graphics. But except for these exceptions, it [probably] won't be hard. Katex uses LaTeX, and Mathics produces LaTeX.

Also, I love the idea of using Katex instead of MathJax, Mathics Django formulas take too much to render and don't look good on every screen (a thing that Katex does).

@Techcable
Copy link
Author

Techcable commented Oct 11, 2021

Yeah I figured it might be a good way to start contributing to the code base. I wanna help make this run faster :)

@TiagoCavalcante
Copy link
Collaborator

Here MathMLForm needs to be replaced with TeXForm. We also need to add a tag around the LaTeX commands (I suggest latex) and add 2 more ifs to mathics.js (here and here).

@rocky
Copy link
Member

rocky commented Oct 11, 2021

I think it worth a try too.

@rocky
Copy link
Member

rocky commented Oct 12, 2021

I should mention something when working with TeXForm. There is a bit of unfinished and incomplete work here. If you look at the mathics scanner project , you will find a in the character tables a number of symbols that have been marked with their AMSLaTeX symbols, for example this one for alpha.

We haven't done a complete job in adding all of the translations in that YAML file yet. Worse, we are not currently using any of this when going to TeXForm.

Not a big deal or conceptually difficult, just a lot of details that haven't been filled in yet.

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

No branches or pull requests

4 participants