Please provide a skinparam to set the tabulation width in number of spaces

+1 vote
asked Sep 11, 2015 in Closed feature request by anonymous

I use \t to align fields with a structure say in an object definition.

Please provide a skinparam to set the tabulation width in number of spaces, so that I could for example have a tab with a 2 spaces width.

Suggested syntax: skinparam tabSize 2

1 Answer

+1 vote
answered Sep 16, 2015 by plantuml (295,760 points)
selected Jul 14, 2018 by Anthony-Gaudino
 
Best answer

In the last beta: https://dl.dropboxusercontent.com/u/13064071/plantuml.jar
we have added a skinparam tabSize X, where X is the width in spaces.

Example:

@startuml
skinparam tabSize 2
object foo {
\tfield1
\tfield2
\tfield3
\tfield5\tfield6
}
@enduml

Does is work for you ?

commented Jul 29, 2020 by Triton
Hi,

It's work fine for state diagram.

Is it also possible to do it for activity diagram?

Thank's
commented Apr 22 by valexiev (1,220 points)

I don't think that is resolved. If the fields are of different width, they are not aligned, even if I specify a large number for tabWidth: see this diagram.

You can use a table to align fields, eg see this diagram.

...