Welcome to PlantUML Q&A, where you can ask questions and receive answers from other members of the community.

You can also submit new features request and vote for them.

support \l and \r in additon to \n

0 votes
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)
asked Feb 4, 2015 in Wanted features by valexiev (490 points)

2 Answers

+1 vote
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 ?

answered Feb 4, 2015 by plantuml (112,180 points)
selected Feb 8, 2015 by valexiev
+1 vote

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

It supports:

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


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!

answered Feb 4, 2015 by plantuml (112,180 points)
Support This Project Offer 250 Mo! Follow PlantUML on Twitter