Giter Site home page Giter Site logo

pavledakic / plantuml Goto Github PK

View Code? Open in Web Editor NEW

This project forked from koppor/plantuml

0.0 0.0 0.0 104 KB

A LuaLaTeX package for PlantUML in LaTeX

Home Page: https://koppor.github.io/plantuml/

License: LaTeX Project Public License v1.3c

Shell 6.06% Lua 22.76% TeX 71.19%

plantuml's Introduction

plantuml CTAN

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

  1. Environment variable PLANTUML_JAR set to the location of plantuml.jar. You get it from https://sourceforge.net/projects/plantuml/files/plantuml.jar/download.
  2. Enviroment variable GRAPHVIZ_DOT set to the location of dot.exe. Example: C:\Program Files (x86)\Graphviz2.38\bin\dot.exe. You can install graphviz using choco 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 that inkscape.exe and pdfcrop are in your path. You can get inkscape using choco 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 -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:

Class relations rendered using SVG

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:

  1. Adapt date and version number in plantuml.sty.
  2. Adapt CHANGELOG.md.
  3. 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+

plantuml's People

Contributors

koppor avatar hajimemat avatar jeff-tian avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.