Re: [graphviz-interest] left-alignment in labels
Ryan Schmidt <[email protected]> Sun, 14 Dec 2014 09:52:28 -0600
| Newsgroups | gmane.comp.video.graphviz |
|---|---|
| Message-ID | <[email protected]> |
On Dec 14, 2014, at 8:57 AM, Andreas Matthias wrote:
>
> In the following example the text is not left-aligned correctly.
> The second and third line are indented a bit.
>
> digraph G {
> node [ shape = "record" ]
> A [
> label="{\
> aaa\l\
> bbb\l\
> ccc\l\
> }"
> ]
> }
>
> I can force a correct alignment by removing indentation in the source file:
>
> digraph G {
> node [ shape = "record" ]
> A [
> label="{\
> aaa\l\
> bbb\l\
> ccc\l\
> }"
> ]
> }
>
> But this is not perfect concerning readability, as is writing everything
> into one line.
>
> Is this considered a bug or is escaping of the end of line character not
> supported?
>
> I'm still using version 2.36.0.
I'm not sure why the whitespace is removed before the first line but not before the other lines, but I would say if you don't want whitespace, don't insert it. In other words,
label="{aaa\lbbb\lccc\l}"
works fine. Also, consider using the HTML-like label syntax instead of the older and less-capable record syntax.
_______________________________________________
[email protected]
http://lists.research.att.com/mailman/listinfo/graphviz-interest