gauss256
gauss256

Reputation: 2653

How to left-align more than two lines in HTML-like label?

I can successfully left-align the first two lines, but not the third, in an HTML-like label using the following code:

digraph TTS {
    node [shape="box"];
    a [label=<line 1 --------<BR ALIGN="LEFT"/>line 2 ----<BR ALIGN="LEFT"/>line 3>];
}

The result is this

image with bad alignment

How can I get this instead?

enter image description here

Upvotes: 8

Views: 1805

Answers (1)

bergant
bergant

Reputation: 7232

Another <BR ALIGN="LEFT"/> after the "line 3" would align it.

For this case even more simple solution exists with \l (not using HTML label):

digraph TTS {
    node [shape="box"];
    a [label="line 1 --------\lline 2 ----\lline3\l"];
}

Upvotes: 7

Related Questions