autonumber increase and decrease indent

0 votes
asked Jan 11 in Wanted features by bilak (140 points)
Hello,

I know it's possible to increase value of autonumber like this

`autonumber inc B`

however if I have some logic like if branches, I'd like to increase the indent. So for example if numbering goes 1,2,3 and now I have branch I'd like to have 3.1, 3.2 .... and then go back to 4. Is this somehow possible without specifying hardcode value like `autonumber 3.1`?

1 Answer

0 votes
answered Jan 12 by plantuml (265,060 points)
We could think about it.

However, it would help if you could post a short example, with eventually the new syntax you are thinking of.

Thanks!
commented Jan 12 by The-Lu (37,840 points)
edited Jan 12 by The-Lu

Hello all,

To be consistent with current syntax (autonumber inc A).

Here is a proposal...wink

  • Why not to create the new syntax:
autonumber A.1

and even:

autonumber A.B.1

...

and even, to restart:

autonumber A

And here is an example:

@startuml
autonumber 
a->b
a<-b
autonumber A.1
alt
a->b
else
a->b
autonumber A.B.1
loop 10 time
a->b
end 
end
autonumber A
a<-b
@enduml

Similar to:

@startuml
autonumber 
a->b
a<-b
autonumber 3.1
alt
a->b
else
a->b
autonumber 3.2.1
loop 10 time
a->b
end 
end
autonumber 4
a<-b
@enduml


And here is another example:

@startuml
autonumber 
a->b
a<-b
autonumber A.1
alt
a->b
else
a->b
autonumber inc A
loop 10 time
a->b
end 
end
@enduml

Similar to:

@startuml
autonumber 
a->b
a<-b
autonumber 3.1
alt
a->b
else
a->b
autonumber inc A
loop 10 time
a->b
end 
end
@enduml

To debate...
If that is clear...

Regards,
Th.

...