Allgemeine Befehle in PlantUML
Entdecken Sie die grundlegenden Befehle, die universell für alle Diagrammtypen in PlantUML gelten. Mit diesen Befehlen können Sie Ihren Diagrammen Vielseitigkeit und individuelle Details verleihen. Im Folgenden unterteilen wir diese allgemeinen Befehle in drei Hauptkategorien:Globale Elemente
- Kommentare: Fügen Sie in Ihr Diagrammskript Anmerkungen oder Erklärungen ein, um zusätzliche Informationen zu übermitteln oder um Hinweise für weitere Änderungen zu hinterlassen.
- Notizen: Fügen Sie zusätzliche Informationen direkt in Ihr Diagramm ein, um das Verständnis zu erleichtern oder wichtige Aspekte hervorzuheben.
- Größenkontrolle: Passen Sie die Dimensionen der verschiedenen Elemente Ihren Wünschen an und sorgen Sie so für ein ausgewogenes und wohlproportioniertes Diagramm.
- Titel und Beschriftungen: Definieren Sie einen passenden Titel und fügen Sie Beschriftungen hinzu, um den Kontext zu verdeutlichen oder bestimmte Teile Ihres Diagramms zu kommentieren.
Beschreibung der kreolischen Syntax
Nutzen Sie die Möglichkeiten der kreolischen Syntax, um den Inhalt eines beliebigen Elements in Ihrem Diagramm weiter zu formatieren. Dieser Wiki-Auszeichnungsstil ermöglicht Folgendes:- Textformatierung: Passen Sie das Aussehen Ihres Textes mit verschiedenen Stilen und Ausrichtungen an.
- Listen: Erstellen Sie geordnete oder ungeordnete Listen zur übersichtlichen Darstellung von Informationen.
- Links: Integrieren Sie Hyperlinks, um die schnelle Navigation zu relevanten Ressourcen zu erleichtern.
Befehl zur Stilsteuerung
Mit dem Befehlstyle haben Sie die vollständige Kontrolle über den Präsentationsstil Ihrer Diagrammelemente. Nutzen Sie diesen Befehl, um:
- Stile zu definieren: Legen Sie einheitliche Stile für Elemente fest, um ein kohärentes visuelles Thema zu erhalten.
- Farben anpassen: Wählen Sie bestimmte Farben für verschiedene Elemente, um die visuelle Attraktivität zu erhöhen und eindeutige Klassifizierungen zu erstellen.
Comments
Simple comment
Everything that starts withsimple quote ' at the beginning of a line is a comment.
@startuml
'Line comments use a single apostrophe
@enduml
Block comment
Block comment use C-style comments except that instead of* you use an apostrophe ',
then you can also put comments on several lines using /' to start and '/ to end.
@startuml
/'
many lines comments
here
'/
@enduml
[Ref. QA-1353] Then you can also put block comment on the same line, as:
Full example
Zoom or Scale
You can use the scale command to zoom the generated image.
You can use either a number or a fraction to define the scale factor.
You can also specify either width or height (in pixel).
And you can also give both width and height: the image is scaled to fit inside the specified dimension.
scale 1.5scale 2/3scale 200 widthscale 200 heightscale 200*100scale max 300*200scale max 1024 widthscale max 800 height
Title
The title keywords is used to put a title.
You can add newline using \n in the title description.
Some skinparam settings are available to put borders on the title.
title
and end title keywords.
Caption
There is also a caption keyword to put a caption under the diagram.
Footer and header
You can use the commands header or footer to
add a footer or a header on any generated diagram.
You can optionally specify if you want a center, left
or right footer/header, by adding a keyword.
As with title, it is possible to define a header or a footer on
several lines.
It is also possible to put some HTML into the header or footer.
Legend the diagram
The legend and end legend are keywords is used to put a legend.
You can optionally specify to have left, right, top, bottom or center
alignment for the legend.
Appendix: Examples on all diagram
Activity
Archimate
Class
Component, Deployment, Use-Case
Gantt project planning
DONE
[(Header, footer) corrected on V1.2020.18]
Object
MindMap
Network (nwdiag)
Sequence
State
Timing
Work Breakdown Structure (WBS)
DONE
[Corrected on V1.2020.17]
Wireframe (SALT)
DONE
[Corrected on V1.2020.18]
Appendix: Examples on all diagram with style
DONE
FYI:
- all is only good for
Sequence diagram title,captionandlegendare good for all diagrams except forsalt diagram
FIXME
🚩
- Now (test on 1.2020.18-19)
header,footerare not good for all other diagrams except only forSequence diagram.
FIXME
Here are tests of title, header, footer, caption or legend on all the diagram with the debug style:
<style>
title {
HorizontalAlignment right
FontSize 24
FontColor blue
}
header {
HorizontalAlignment center
FontSize 26
FontColor purple
}
footer {
HorizontalAlignment left
FontSize 28
FontColor red
}
legend {
FontSize 30
BackGroundColor yellow
Margin 30
Padding 50
}
caption {
FontSize 32
}
</style>
Activity
Archimate
Class
Component, Deployment, Use-Case
Gantt project planning
Object
MindMap
Network (nwdiag)
Sequence
State
Timing
Work Breakdown Structure (WBS)
Wireframe (SALT)
FIXME
Fix all (title, caption, legend, header, footer) for salt.
FIXME
Mainframe
Appendix: Examples of Mainframe on all diagram
Activity
Archimate
FIXME
🚩
Cropped on the top and on the left
FIXME
Class
FIXME
🚩
Cropped on the top and on the left
FIXME
Component, Deployment, Use-Case
FIXME
🚩
Cropped on the top and on the left
FIXME
Gantt project planning
FIXME
🚩
Cropped on the top and on the left
FIXME
Object
FIXME
🚩
Cropped on the top!
FIXME
MindMap
Network (nwdiag)
FIXME
🚩
Cropped on the top!
FIXME
Sequence
State
FIXME
🚩
Cropped on the top and on the left
FIXME
Timing
Work Breakdown Structure (WBS)
Wireframe (SALT)
Appendix: Examples of title, header, footer, caption, legend and mainframe on all diagram
Activity
Archimate
Class
Component, Deployment, Use-Case
Gantt project planning
Object
MindMap
Network (nwdiag)
Sequence
State
Timing
Work Breakdown Structure (WBS)
Wireframe (SALT)