Maths

Within PlantUML, you can use AsciiMath notation:

or JLaTeXMath notation:

Here is another example:

Standalone diagram

You can also use @startmath/@endmath to create standalone AsciiMath formula.

Or use @startlatex/@endlatex to create standalone JLaTeXMath formula.

How is this working?

To draw those formulas, PlantUML uses two open source projects:

ASCIIMathTeXImg.js is small enough to be integrated into PlantUML standard distribution.

And since 2021 (V1.2021.8), ASCIIMathTeXImg.js was ported on JAVA in PlantUML with ASCIIMathTeXImg.java and since 2024 (V1.2024.5) there was some more corrections and improvements (with the The-Lum/ASCIIMathTeXImg Project).

Since JLatexMath is bigger, you have to download it separately, then unzip the 4 jar files (batik-all-1.7.jar, jlatexmath-minimal-1.0.3.jar, jlm_cyrillic.jar and jlm_greek.jar) in the same folder as PlantUML.jar.