<center> desired

0 votes
asked Jan 17, 2020 in Wanted features by g.edward.roberts (480 points)
if one looks at

@startuml
!include http://material.elparazim.com/library/SysML.1.6.puml
class C {
Compartment(attributes,true)
anAttribute : Integer
}
@enduml

what I need is for attributes to be centered (like maybe <center></center>) and for the anAttribute to be left justified as it is... currently there is nothing I can find that would allow me to do this individually for these two different texts

1 Answer

0 votes
answered Jan 17, 2020 by plantuml (295,000 points)

There is a possible workaround :

@startuml
class C {
-- <i>attributes --
anAttribute : Integer

== <i>attributes ==
anAttribute : Integer

.. <i>attributes ..
anAttribute : Integer

}
@enduml

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

We have to think about a better solution...

commented Jan 17, 2020 by g.edward.roberts (480 points)
This is not the way that the UML Standard shows the notation of Compartment Labels... it is a solid line with the label below it in the center and italicized... the standard calls out this specifically...
...