- LaTeX (duh)
- Java
- The latest version of the
plantuml.jarfile
We'll make use of the plantuml package:
\documentclass{...}
\usepackage{plantuml}
\begin{document}
\begin{plantuml}
@startuml
Alice -> Bob: Hello
Alice <- Bob: Hi!
@enduml
\end{plantuml}
\end{document}Requires:
- Compiling with LuaLaTeX
- Setting
--shell-escapeto allow executing PlantUML - Setting the
PLANTUML_JARenviroment variable to the path toplantuml.jar
Important
Do not set the --output-directory/-outdir parameter, it breaks PlantUML.
To simplify compilation, you can use latexmk with the provided .latexmkrc configuration file:
$pdf_mode = 4; # export to PDF
$lualatex = 'lualatex --file-line-error %O %S'; # use LuaLaTeX
# set shell-escape
set_tex_cmds('--shell-escape -interaction=nonstopmode %O %S');
# $out_dir = 'build'; # for some FUCKING reason, this breaks PlantUML
# setup PlantUML
$ENV{PLANTUML_JAR} = 'plantuml.jar';
# cleanup files
$clean_ext .= '%R-plantuml.tex %R-plantuml.latex %R-plantuml.txt aux bbl pytxcode svg-inkscape';
$clean_full_ext = 'build';Therefore, compile with:
latexmk <whatever>.tex
./
├─ plantuml.jar
├─ <whatever>.tex
├─ .latexmkrc