A LuaLaTeX package for PlantUML in LaTeX
PlantUML is a program which transforms text into UML diagrams. This package allows for embedding PlantUML diagrams using the PlantUML source.
Currently, this project runs with lualatex only. Check issue #1 for the current state of affairs for support pdflatex.
PLANTUML_JAR
set to the location of plantuml.jar
.GRAPHVIZ_DOT
set to the location of dot.exe
.C:\Program Files (x86)\Graphviz2.38\bin\dot.exe
.choco install graphviz
.-shell-escape
included.inkscape.exe
and pdfcrop
are in your path.choco install inkscape
.pdfcrop
should be part of your latex distribution.LaTeX source:
\documentclass{scrartcl}
\usepackage{plantuml}
\begin{document}
\begin{plantuml}
@startuml
Alice -> Bob: test
@enduml
\end{plantuml}
\end{document}
Compilation: lualatex -shell-escape example-minimal
Result:
LaTeX source:
\documentclass{scrartcl}
\usepackage{graphics}
\usepackage{epstopdf}
\epstopdfDeclareGraphicsRule{.svg}{pdf}{.pdf}{
inkscape #1 --export-filename=\OutputFile
}
\usepackage[output=svg]{plantuml}
\begin{document}
\begin{plantuml}
@startuml
class Car
Driver - Car : drives >
Car *- Wheel : have 4 >
Car -- Person : < owns
@enduml
\end{plantuml}
\end{document}
For older Inkscape use this LaTeX source:
\documentclass{scrartcl}
\usepackage{graphics}
\usepackage{epstopdf}
\epstopdfDeclareGraphicsRule{.svg}{pdf}{.pdf}{
inkscape -z --file=#1 --export-pdf=\OutputFile
}
\usepackage[output=svg]{plantuml}
\begin{document}
\begin{plantuml}
@startuml
class Car
Driver - Car : drives >
Car *- Wheel : have 4 >
Car -- Person : < owns
@enduml
\end{plantuml}
\end{document}
Compilation: lualatex -shell-escape example-class-relations
Result:
Your latex distribution should take care.
For manual installation, copy plantuml.*
to your local texmf folder in the subdirectoy tex/latex/plantuml
.
See the discussion at tex.sx for the concrete location of the folder on your system.
The release is built using GitHub Actions (workflow file) using release.sh
.
Release prepration:
plantuml.sty
.CHANGELOG.md
.TikZ-UML is a very powerful package based on TikZ. More alternative solutions are collected at the CTAN topic UML.
SPDX-License-Identifier: LPPL-1.3c+