Can I use the plantUML language in LaTeX?

It is possible to use the PlantUML language direcly inside LaTeX using the plantuml package.

Here is a minimal example:

\documentclass{scrartcl}
\usepackage{plantuml}
\begin{document}
\begin{plantuml}
  @startuml
  Alice -> Bob: Hello
  Alice <- Bob: Hi!
  @enduml
\end{plantuml}
\end{document}

For building LaTeX with PlantUML the PLANTUML_JAR environment variable has to be set and Java must be installed.

To build this document, run lualatex --shell-escape documentname

The result should look like this:

Result with a PlantUML diagram

A more detailed example can be found here: https://koppor.github.io/plantuml/

Tags:

Tikz Uml