Skip to content

GiovanniSalmeri/asciimathtotex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

AsciiMathToTex

Convert AsciiMath to TeX.

Introduction

This PHP class converts AsciiMath expressions in TeX expressions. In this way KaTeX (which is much lighter and much faster than MathJax) can be used to render AsciiMath.

PHP >= 7.0 is required.

Class synopsis

class AsciiMathToTex {

    /* Methods */
    public __construct(string $decimal = ".")
    public parse(string $asciimath): string

}

Example

require "asciimathtotex.php";

$parser = new AsciiMathToTex();
$asciimath = "x=(-b+-sqrt(b^2-4ac))/(2a)";
$tex = $parser->parse($asciimath);

Acknowledgements

This class is a port of the original asciimath2tex 1.50 by Christian Lawson-Perfect.

Developer

Giovanni Salmeri.

About

Convert AsciiMath to TeX

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages