plantuml

Installation

pacman -S plantuml

Steps

  1. In any directory and create a txt file in it.
  2. Give a name to the txt file.
  3. Insert plantuml syntax for a sequence diagram (or any other kind of diagram) in this txt file.
  4. Launch plantuml from terminal in that directory (plantuml installation in the machine is a prerequisite). plantuml .
  5. A png image is exported into that same directory by plantuml.

Other options

The VS code plugin didn’t work when I tried it. Didn’t spend too much time on it though.

References

Many good examples here:

  1. https://plantuml.com/mindmap-diagram
  2. https://plantuml.com/sequence-diagram

In emacs

Reference: https://plantuml.com/emacs

  1. Download plantuml.jar from official download page and save it at a location in your computer. e.g. /home/you/path/to/plantuml.jar

  2. install plantuml-mode via melpa.

  3. in scratch execute

    (setq org-plantuml-jar-path (expand-file-name "/home/you/path/to/plantuml.jar"))
    (add-to-list 'org-src-lang-modes '("plantuml" . plantuml))
    (org-babel-do-load-languages 'org-babel-load-languages '((plantuml . t)))
    
  4. put some uml in your org file e.g.

    title Authentication Sequence
    
    Alice->Bob: Authentication Request
    note right of Bob: Bob thinks about it
    Bob->Alice: Authentication Response
    
  5. export e.g. with C-c C-e h o

    Evaluate this with C-c C-c

    title Authentication Sequence
    
    Alice->Bob: Authentication Request
    note right of Bob: Bob thinks about it
    Bob->Alice: Authentication Response