Phactorial renders math on the server in PHP
The library reads TeX and MathML and can render formulas as SVG or PNG, or export them to accessible markup.
Phactorial gives PHP applications a way to render mathematical notation on the server. The library accepts TeX and MathML, then can produce graphics or markup without requiring a browser or a Node.js process.
Choose output for the destination
SVG keeps equations scalable on web pages. PNG can be useful in delivery channels that do not display SVG, and the documentation says this output requires PHP’s Imagick extension. MathML can preserve equation structure for compatible browsers and assistive technologies.
Check the PHP requirements
The project lists PHP 8.4 and the ctype, DOM and mbstring extensions as requirements. The library bundles a math font. Teams can test representative formulas and output formats in the same environment that will render them in production.
Sources: one-learning-community.github.io, laravel-news.com.
Share
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Angry
0
Sad
0
Wow
0