support \l and \r in additon to \n

0 votes
asked Feb 4, 2015 in Wanted features by valexiev (520 points)
in additon to \n (new line, centered), dot supports \l (left aligned) and \r (right aligned).

Would be great if you support the same, at least for relation labels (but also for other labels where it makes sense)

2 Answers

+1 vote
answered Feb 4, 2015 by plantuml (134,510 points)
selected Feb 8, 2015 by valexiev
 
Best answer

Ok, thanks for the suggestion, we will have a look on this, and post a message here when this will be ready.

Note that there is a not-very-documented feature:

skinparam defaultTextAlignment left
class cl1
class cl2
cl1 -- cl2 : this is\non several\nlines

Does it fit your needs ?

+1 vote
answered Feb 4, 2015 by plantuml (134,510 points)

Please find here a beta version: https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

It supports:

@startuml
class cl1
class cl2
class cl3
class cl4
cl1 -- cl2 : this is\non several\nlines
cl2 -- cl3 : this is\lon several\llines
cl3 -- cl4 : this is\ron several\rlines
@enduml

 

Mixing \r \n and \l on the same label is not possible (yet). This is more difficult to implement, so please to use if you need to mix such alignment in the same label.

Thanks again for your suggestion!

...