Currently, the Math extension is quite complex and comes with dependencies to
- mathjax
- mathoid
- texvcjs
- texvcinfo
- restbase
- (database) tables and cache
It converts a string given in a relatively simple LaTeX dialect to MathML and then to SVG PNG. The new MathML standard and the announced implementation of MathML in Chrome and Edge native MathML rendering will be sufficient for most users. The remaining user group (client-side MathJax) can serve as a bridge technology until all Browsers support MathML.
After a brief discussion in the W3C Math WG, the implementation of a native PHP to MathML converter seems feasible and doable. While the codebase of the Math extension might grow, the complexity of the setup decreases significantly.
The most incremental way is to implement the native MathML rendering in texvcjs and then port it 1-1 to PHP using phpeggy.
As a preparation step, one might also want to merge texvcjs and texvcinfo.
References:
- Stackoverflow has some hints on realization of LaTeX to MathML in php.