Global Keywords and Options¶
Also see:
- Creole markup
- Settings (skinparams)
- Notes
@start[uml | ditaa | jcckit]¶
from the FAQ:
The @startuml/@startditaa/@startjcckit is useful to determine the type of diagram (uml, ditaa, jcckit…), and because you can optionally put a filename after the @startXXX. This also allows to have several diagrams inside the same file.
@startuml¶
Todo
@startuml - explain that it’s the most common, but there are others
@startditaa¶
Todo
@startditaa - explain t
@startjcckit¶
Todo
@startjcckit - explain t
Rectangle¶
Usage: |
Puts a rectangular box around the items that are listed within the brackets ( |
---|
Diagram Layout Direction¶
Default direction is top to bottom
Usage: | [ top to bottom direction | left to right direction ] |
---|
Page Break (newpage)¶
Usage: |
Breaks up the diagram into another page. Equivalent to a “page break” |
---|
Only works on these pages (confirmed these only):
- Use Case
- Sequence
Todo
newpage is common to what diagrams exactly? Check the source code
Zoom¶
Comments¶
Include files¶
Constants¶
Macros¶
(explanation)
A macro can include another macro (must it be previously defined?)
A macro can be polymorphic with argument count.
Special Variables¶
%date%¶
%date% the current date and time
format: Date format can be specified using format specified in SimpleDataFormat documentation :ref:`https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html`_
ex: default format: %date%
ex: format… %date[yyyy.MM.dd ‘at’ HH:mm]%
%dirpath%¶
%dirpath% Path of the current file
- for use with including files – to specify a path
- does not render anything when used in a diagram
%filename%¶
%filename% Name of the current file
- for use with including files – to specify a path
- does not render anything when used in a diagram
- default values
- !ifdef !else !endif
- !ifndef
- && (boolean AND)
- || (boolean OR)
- !import (a zipped library)
- ## (append text to a macro)
You can use system environment variable or constant definition when using include:
!include %windir%/test1.txt
!define PLANTUML_HOME /home/foo
!include PLANTUML_HOME/test1.txt