Directory macros/luatex/latex/plantuml
plantuml
Version
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.
Preconditions
- Environment variable
PLANTUML_JAR
set to the location ofplantuml.jar
. You get it from https://sourceforge.net/projects/plantuml/files/plantuml.jar/download. - Windows: Environment variable
GRAPHVIZ_DOT
set to the location ofdot.exe
. Example:C:\Program Files (x86)\Graphviz2.38\bin\dot.exe
. You can install graphviz usingchoco install graphviz
. - lualatex available with command line parameter
-shell-escape
included. - In case you want to have the images as PDFs (and not using TikZ or PNG), ensure that
inkscape.exe
andpdfcrop
are in your path. You can get inkscape usingchoco install inkscape
.pdfcrop
should be part of your latex distribution.
Examples
Minimal Example
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:
Example Class Relations Rendered Using SVG
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:
Installation
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.
Development
The release is built using GitHub Actions (workflow file) using release.sh
.
Release prepration:
- Adapt date and version number in
plantuml.sty
. - Adapt
CHANGELOG.md
. - Set a git tag and push.
Alternative Solutions
TikZ-UML is a very powerful package based on TikZ. More alternative solutions are collected at the CTAN topic UML.
License
SPDX-License-Identifier: LPPL-1.3c+
Download the contents of this package in one zip archive (70.6k).
plantuml – Support for rendering UML diagrams using PlantUML
PlantUML is a program which transforms text into UML diagrams. This LaTeX package allows for embedding PlantUML diagrams using the PlantUML source.
Currently, this project runs with LuaLaTeX only.
Package | plantuml |
Bug tracker | https://github.com/koppor/plantuml/issues |
Repository | https://github.com/koppor/plantuml/ |
Version | 0.4.0 |
Licenses | The LaTeX Project Public License 1.3c |
Copyright | 2018–2023 Oliver Kopp |
Maintainer | Oliver Kopp |
Contained in | TeX Live as plantuml MiKTeX as plantuml |
Topics | UML LuaTeX Use Lua |