Automattic / Automattic/jetpack
Beautiful Math: add option to use MathJax to render equations
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
We currently use our own in-house solution to render mathematical equations in our Beautiful Math feature:
https://github.com/Automattic/jetpack/blob/5cc6362baaacae743fca7bf2ddc96fc7548df5fd/modules/latex.php#L1-L12
It would be nice if we could switch to [MathJax](https://www.mathjax.org/) instead, since the library is more recent, and offers more flexibility and options than ours.
- This would have to be done while staying compatible with existing equations, so as to not break things for folks who have been using Beautiful Math until today.
- We would have to load the MathJax library, and not include it in the plugin itself.
Here is a first exploration on how this could be done: #2685
******
Related discussions:
- https://github.com/Automattic/jetpack/issues/17347#issuecomment-702730816
- p2y3YZ-4cV-p2
Contributor guide
Research direction
Review modules/latex.php and the prior exploration in #2685 first. Trace how existing equations are handled and where the external MathJax library would be loaded. Done means existing equations remain compatible and MathJax is loaded externally rather than bundled in the plugin.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, php
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100