Is there a way to indent text inside a shape?

0 votes
asked Oct 13, 2017 in To be sorted by rd27 (530 points)

Is there a way to indent text inside a shape? I would like to just show some text indented by a couple spaces like the following:

line 1

  line 2

    line 3

But I can't seem to find a way to do that. Below is what I have tried. Only using characters like .. or __ works, but then those characters are visible of course. 

 

rectangle test_indent [
text
  text
* text
]

rectangle test_indent_as as "
text
  text
* text
*  text
 * text
<br>text
..text
__text
"

 

1 Answer

+1 vote
answered Oct 13, 2017 by plantuml (188,280 points)
selected Oct 9 by rd27
 
Best answer

You can use \t :

@startuml
rectangle test_indent [
text
\ttext
\t\ttext
]
@enduml

http://www.plantuml.com/plantuml/uml/SoWkIImgAStDuIfAJIv9p4lFILKeIIqkYS_CIqdDAr68vYf9hIZXYYc1Kb16B9T3QbuAK1i0

commented Oct 19, 2017 by rd27 (530 points)
Thanks! Is there anyway to do two character tabs rather than 4 characters>
commented Jan 25 by Anthony-Gaudino (7,790 points)
I guess that this may work:

skinparam tabSize 2
commented Oct 9 by rd27 (530 points)
Yes, that does work.  Thanks!
...