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

Use KaTeX instead of MathJax #1998

Closed
wants to merge 3 commits into from
Closed

Use KaTeX instead of MathJax #1998

wants to merge 3 commits into from

Conversation

fonsp
Copy link
Owner

@fonsp fonsp commented Mar 21, 2022

This PR uses KaTeX to render LaTeX math inside markdown instead of what we currently use: https://www.mathjax.org/

Pros:

Cons:

  • KaTeX has different LaTeX support than MathJax, and some things will not work anymore. Searching online, it looks like the support differences are relatively minor, but it will break something.

TODO:

More tests:

  • try running some community notebooks
  • computational thinking notebooks
  • our sample_test_1 notebook
  • mchem

Misc:

@github-actions
Copy link
Contributor

Try this Pull Request!

Open Julia and type:

julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/fonsp/Pluto.jl", rev="katex")
julia> using Pluto

@fonsp fonsp linked an issue Nov 15, 2022 that may be closed by this pull request
@fonsp
Copy link
Owner Author

fonsp commented Dec 29, 2022

Chrome 109 (early 2023) will include native support for MatML Core (https://chromestatus.com/feature/5240822173794304), which means that all major browser will support it soon! That might mean that we can use an even smaller/faster JS library (like https://temml.org/ ), or we could even do the latex -> mathml conversion server-side, and use no library at all.

@fonsp fonsp added frontend Concerning the HTML editor performance labels Apr 26, 2023
@fonsp
Copy link
Owner Author

fonsp commented Oct 30, 2023

We shouldn't switch to KaTeX because it supports fewer characters/features of LaTeX that people are now expecting to work. MathJax also seems to take more care about accessibility than KaTeX.

It looks like MathJax is working on a 4.0 release which might fix the two plotly bugs (because ES6 modules are loaded in isolation).

@fonsp fonsp closed this Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Concerning the HTML editor performance
Projects
None yet
1 participant