-tsvg
con la línea de comandos de PlantUML para habilitar la generación SVG. Obtenga más información en nuestra guía de línea de comandos.
format="svg"
en su definición de tarea Ant para facilitar la generación de SVG. Encontrará instrucciones detalladas en nuestra guía de tareas Ant.
<target name="main">
<plantuml dir="./src" format="svg" />
</target>
svgLinkTarget
setting allows you to modify the target
attribute in the hyperlinks generated in the SVG output, thereby controlling how the links will open when clicked.
Referencing the HTML specification, you have the following options:
_blank
: Opens the link in a new window or tab_parent
: Opens the link in the parent frame_self
: Opens the link in the same frame where it was clicked (default setting)_top
: Opens the link in the full body of the window_top
, applied when the svgLinkTarget
is left empty.
@startuml
skinparam pathHoverColor green
class Foo2 [[http://www.yahoo.com/Foo2]] {
+double[] x
+double y
}
Foo2 --> Foo3
@enduml
[Reference: QA-5453]
style
, width
, and height
attributes in the SVG output header, set the skinparam svgDimensionStyle
to false
. This gives you cleaner output, focusing solely on the essential elements of your diagram.
@startuml
skinparam svgDimensionStyle false
component a {
}
component b {
}
a -(0- b
@enduml
[Reference QA-7334]
svgSize
pragma directive to define custom sizes for specific SVG elements in your PlantUML diagrams.
svgSize
Pragma Directive!pragma svgSize <U+hhhhh> XX
directive informs PlantUML to assume the size of the <U+hhhhh>
element to be equivalent to the 'XX' value specified.
Here are different ways you can use this directive to obtain the ideal setting:
!pragma svgSize <U+hhhhh> XX
!pragma svgSize <U+hhhhh> I
svgSize
directive:
@startuml
!pragma svgSize <U+1F610> XX
test: text <U+1F610>
test_size45: text <size:45><U+1F610>
@enduml
svgSize
pragma using the -P
option on the command-line. Remember to:
java -jar plantuml.jar "-PsvgSize=<U+1F610> XX" "-PsvgSize=<U+1F611> I"