Is there a way to indent text inside a shape?

0 votes
asked Oct 13, 2017 in To be sorted by rd27 (460 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

rectangle test_indent_as as "
* text
*  text
 * text


1 Answer

+1 vote
answered Oct 13, 2017 by plantuml (241,480 points)
selected Oct 9, 2018 by rd27
Best answer

You can use \t :

rectangle test_indent [

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

skinparam tabSize 2
commented Oct 9, 2018 by rd27 (460 points)
Yes, that does work.  Thanks!
commented Nov 19, 2020 by jackson
It seems, this doesn't work anymore with newer versions.

Any suggestions?
asked Nov 20, 2020 in Bug by The-Lu (14,160 points) Indent text inside a shape broken [on 1.2020.20beta]
commented Nov 20, 2020 by plantuml (241,480 points)

Thanks for the report.

It should be fixed in last beta (1.2020.20beta14)

We will publish this new release in the incoming days.