Skip to content

About

Math typesetting in plain PHP: TeX and MathML in; SVG, PNG, MathML, TeX and Word equations out. No Node, no browser.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Phactorial

phactorial/phactorial phactorial/commonmark core commonmark recipes

Math typesetting in plain PHP. It reads TeX and MathML and writes SVG, PNG, MathML, TeX, Word equations and text. It needs PHP 8.4 or later, and no Node, browser or fonts on the server. PNG output also needs ext-imagick.

use Phactorial\MathRender;

echo MathRender::fromTex('x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}')->display()->svg();

Packages

This repository holds two Composer packages.

  • phactorial/phactorial (packages/core): the equation builder, TeX and MathML readers, layout and renderers.
  • phactorial/commonmark (packages/commonmark): a CommonMark extension that reads math in Markdown.
composer require phactorial/phactorial
composer require phactorial/commonmark

Documentation

Guides and recipes are at https://one-learning-community.github.io/phactorial/.

Contributing

See CONTRIBUTING.md. The code is MIT licensed; NOTICE.md lists the bundled font.

About

Math typesetting in plain PHP: TeX and MathML in; SVG, PNG, MathML, TeX and Word equations out. No Node, no browser.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages