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.
The default encoding is UTF-8.
Most LaTeX commands are available including:
- macros from amsmath and symbols from amssymb and stmaryrd
- TeX macro
- accents from amsxtra package
\fcolorboxfrom the package color
\scaleboxfrom the package graphicx
- most latin unicode characters are available and cyrillic or greek characters are in the artifacts jlatexmath-font-cyrillic and jlatexmath-font-greek
- vertical and horizontal lines are handled in array environment
- commands to change the size of the font are available :
- fonts which are embedded in the jlatexmath jar file for use by fop 1.0 to generate PDF, PS or EPS (SVG export with shaped fonts works fine too). Since jlatexmath version 0.9.5, the fop plugin is fully compatible with fop 1.0 and xmlgraphics 1.4
- and probably other things I forgot...
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.
To run jmh benchmarks (measuring parse and render performance):
# benchmarks are in core module cd jlatexmath mvn clean install -P benchmark
To run code coverage
mvn -DrepoToken=TOKEN clean cobertura:cobertura coveralls:report