How to add diagrams

Diagrams are useful to visualize the structure of a system or processes. Metanorma supports the PlantUML diagramming tool, so that you can create different kinds of diagrams directly in a Metanorma document.


You need to have PlantUML installed in order to use this feature. To install PlantUML, see installation notes for further details.

Adding a diagram

To add one or more diagrams in a Metanorma document:

  1. Begin a new literal block and use the attribute [plantuml].

    The compiler now knows that PlantUML syntax follows.

  2. Begin the diagram with @startuml.

  3. Enter your diagram using the PlantUML notation.

  4. End the diagram with @enduml.


Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response

Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response

Once you compile the document, the compiler will transform your text input into a PNG image. The images are stored in the plantuml directory.

  • Visit the PlantUML website to learn more about PlantUML and what kinds of diagrams it supports.