Thursday, 11 April 2024

PlantUML: asciimath support

Using @startmath/@endmath, we can create standalone AsciiMath formula.

 

asciiMath.txt

@startmath
sum_(i=1)^n i^3=((n(n+1))/2)^2
@endmath

 

Above snippet generate below diagram.

 

 


You can even combine ascii math with uml diagrams using <math> tag.

 

asciiMathHelloWord.txt

@startuml

client --> server: please solve : <math>sum_(i=1)^n i^3=((n(n+1))/2)^2</math>
server --> client: send the response

client --> server : solve this too : <math>x = (-b+-sqrt(b^2-4ac))/(2a)</math>
server --> client: send the response

@enduml

 

Above snippet generate below diagram.



 

 

 

Previous                                                    Next                                                    Home

No comments:

Post a Comment