Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A LuaLaTeX package for PlantUML in LaTeX

License

NotificationsYou must be signed in to change notification settings

koppor/plantuml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 withlualatex only.Checkissue #1 for the current state of affairs for support pdflatex.

Preconditions

  1. Environment variablePLANTUML_JAR set to the location ofplantuml.jar.You get it fromhttps://sourceforge.net/projects/plantuml/files/plantuml.jar/download.
  2. Windows: Environment variableGRAPHVIZ_DOT set to the location ofdot.exe.Example:C:\Program Files (x86)\Graphviz2.38\bin\dot.exe.You can install graphviz usingchoco install graphviz.
  3. lualatex available with command line parameter-shell-escape included.
  4. In case you want to have the images as PDFs (and not using TikZ or PNG), ensure thatinkscape.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:

Minimal example

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}@startumlclass CarDriver - 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}@startumlclass CarDriver - Car : drives >Car *- Wheel : have 4 >Car -- Person : < owns@enduml\end{plantuml}\end{document}

Compilation:lualatex -shell-escape example-class-relations

Result:

Class relations rendered using SVG

Installation

Your latex distribution should take care.

For manual installation, copyplantuml.* to your localtexmf folder in the sub directoytex/latex/plantuml.Seethe discussion at tex.sx for the concrete location of the folder on your system.

Development

The release is built usingGitHub Actions (workflow file) usingrelease.sh.

Release preparation:

  1. Adapt copyright year (line 1)
  2. Adapt as date and version number (line 6) inplantuml.sty.
  3. AdaptCHANGELOG.md.
  4. Set a git tag and push.

Alternative Solutions

TikZ-UML is a very powerful package based onTikZ.More alternative solutions are collected at theCTAN topic UML.

License

SPDX-License-Identifier: LPPL-1.3c+


[8]ページ先頭

©2009-2025 Movatter.jp