Math formulas in diagrams (activity, component, etc)

+1 vote
asked Aug 13, 2018 in Wanted features by SMFSW
Hello,

I tried to include math formulas in activity diagrams without success.

I tried all explained ways:

:<math>...</math>;

@startmath ... @endmath

@startlatex ... @endlatex

I also tried to make a file with only formulas, using @startmath/@endmath surrounded by various @startuml (id=xx)/@endduml so I can include formulas by names in puml files.

None of these seems to work.

Is this an issue with the syntax I use, or is this a limitation of PlantUML?

If it is a limitation, this would be really great if it could be integrated in later PlantUML version.

Thanks for the help!

SMFSW
commented Aug 13, 2018 by SMFSW
I forgot to mention:
I tried this with PlantUML plug-in in Visual Studio Code.

I put AsciiMath and JLatexMath in the plug-in folder where plantuml.jar is located.

I also tested the plantuml.jar version and switched to the latest jar available on the website to be able to generate math formulas correctly following examples given in language specification.

1 Answer

0 votes
answered 5 days ago by The-Lu (19,740 points)

Hello S.,

Just to answer to an old unanswered question (and confirm that is now OK):

On activity diagram:

@startuml
start
:<math>int_-1^1 sqrt(1-x^2)dx = pi/2</math>;
:<math>...</math>;
end
@enduml

On component:

@startuml
node math [
<math>int_-1^1 sqrt(1-x^2)dx = pi/2</math>
]
@enduml

And in Visual Studio Code, this should work since it uses a plantuml server...

Regards,
Th.

...