opencollab / jlatexmath

A Java API to render LaTeX
Other
507 stars 109 forks source link


Maven Central
Coverage Status

JLaTeXMath is a Java library. Its main purpose is to display mathematical formulas written in LaTeX. JLaTeXMath is the best Java library to display LaTeX code.

This library is used by numerous important projects like Scilab, Geogebra, Freeplane, Mathpiper, CaRMetal, Ultrastudio, etc.

The default encoding is UTF-8.

Most LaTeX commands are available including:

A few examples are available in the source distribution, they show how to use JLaTeXMath and how to write new commands using Java.

A first example :

    

a second one :

    

and a third one :

    

JLaTeXMath is used by Scilab to display formulas written in LaTeX in graphic windows:

JLaTeXMath is a fork of the excellent project JMathTeX.

To build the jlatexmath artifacts just type

mvn clean install

Some examples are provided to show how to use easily the library.

Have fun and if you meet any problem, don't hesitate to create a new issue on github.

License

Regarding JLaTeXMath’s Classpath Exception and JavaScript: If you use the Google Web Toolkit (GWT) to compile JLaTeXMath to an “executable” (in JavaScript) you can then include/link this “executable” JavaScript library on a website or inside another program. In this case the rest of the website/program need not be licensed under the GPL.

Benchmarks

To run jmh benchmarks (measuring parse and render performance):

# benchmarks are in core module
cd jlatexmath
mvn clean install -P benchmark

Code coverage

To run code coverage

mvn -DrepoToken=TOKEN clean cobertura:cobertura coveralls:report