Maths
Within PlantUML, you can use AsciiMath notation:
|
🎉 Copied!
|
|
or JLaTeXMath notation:
|
🎉 Copied!
|
|
Here is another example:
|
🎉 Copied!
|
|
Standalone diagram
You can also use @startmath/@endmath to create standalone AsciiMath formula.
|
🎉 Copied!
|
|
Or use
@startlatex/@endlatex to create standalone JLaTeXMath formula.
|
🎉 Copied!
|
|
How is this working?
To draw those formulas, PlantUML uses two open source projects:
- AsciiMath that converts AsciiMath notation to LaTeX expression;
- JLatexMath that displays mathematical formulas written in LaTeX. JLaTeXMath is the best Java library to display LaTeX code.
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.