I am creating a component diagram. In which, I would like the spaces given in between words to be preserved.
e.g.
@startuml["Hello World"]@enduml
The generated PNG preserves the spaces accordingly.
https://www.plantuml.com/plantuml/img/SoWkIImgAStDuOfMyaZDoSbNG0FX-KKvAKgnN0wfUIb0PG00
But the generated SVG is not preserving the spaces. Its like this
https://www.plantuml.com/plantuml/svg/SoWkIImgAStDuOfMyaZDoSbNG0FX-KKvAKgnN0wfUIb0PG00
How can I preserve the spaces in SVG as well?
(--------)
Hello all,
A first workaround will be to use horizontal tabulation '\t':
@startuml ["Hello\t\tWorld"] @enduml www.plantuml.com/plantuml/uml/SoWkIImgAStDuOfMyaZDoScFAOaf2SyloabHYkLoICrB0Ke10000
Here is the PNG result:
Here is the SVG result:
If that can help,Regards,Th.
In Plantuml you can also use Unicode characters...The "non-breaking space" (<U+00A0>) works to preserve width...
for instance:
!$blankSpace = "<U+00A0><U+00A0><U+00A0>"
will not collapse to a single space...