Search code examples
plantuml

How do I left align a line in the title of PlantUML


How do I left align a line in the title of PlantUML?

@startuml
title
SomeTitle . SomeTitle . SomeTitle . SomeTitle .
<font size=10> Want this left aligned</font>

endtitle

Alice -> Bob: Hello
@enduml

http://www.plantuml.com/plantuml/uml/SoWkIImgAStDuIh9BCb9vGhEpqqD0R4Kz1I8O7FPfENdbIWKPrQbsXeQs2c49m9v9HcPnGevgMab2eavcUbvgIas-Y1LTbnSgNaf46ku77CoarCLTEqKdFAJh1GyKdDoyhaSWD90bm00

I have tried

<font align:left>X</font>
<font text-align:left>Y</font>

I also tried adding left to the title tag.


Solution

  • PlantUML has GraphViz as a rendering engine. It supports \l and \r for left and right aligned:

    @startuml
    title SomeTitle . SomeTitle . SomeTitle . SomeTitle .\l<font size=10>Want this left aligned</font>
    
    Alice -> Bob: Hello
    @enduml
    

    PlantUML image