Can I center the description text at the bottom the state box?

0 votes
asked Nov 11, 2022 in Question / help by songyuc (120 points)

I want to center the description text at the bottom the state box.

Puml:

@startuml CMake
[*] --> CmakeBuild: CMakeLists.txt
CmakeBuild: cmake .. # how to center it?
CmakeBuild --> [*]
@enduml

commented Nov 14, 2022 by The-Lu (74,900 points)

Hello S., and all,

It seems that is not yet implemented...

Here is a not yet working example:

@startuml CMake
<style>
element {
  FontSize 13
  Fontcolor red
  HorizontalAlignment center
  title {
    FontStyle bold
    FontSize 11
    Fontcolor blue
  }
}
</style>
[*] --> CmakeBuild: CMakeLists.txt
CmakeBuild: cmake
' how to center it?
CmakeBuild --> [*]
@enduml

@PlantUML team: Could you add HorizontalAlignment management on State diagram...

Regards.

1 Answer

0 votes
answered Nov 18 by The-Lu (74,900 points)

Hello S.,

FYI that is now fixed and implemented on v1.2024.8:

- Thanks PlantUML team for your work.

@startuml CMake
<style>
element {
  FontSize 13
  Fontcolor red
  HorizontalAlignment center
  title {
    FontStyle bold
    FontSize 11
    Fontcolor blue
  }
}
</style>
[*] --> CmakeBuild: CMakeLists.txt
CmakeBuild: cmake
' how to center it?
CmakeBuild --> [*]
@enduml

Ref.:

Regards,
Th.

...