Text wrapping in Graphviz?

I’m wondering if anything has changed with regard to supporting automatically wrapping text in Graphviz? I didn’t see anything on this forum and DuckDuckGo continues to point to the StackOverflow posts from a decade ago: Text wrapping with dot, Automatic multiline labels in Graphviz?

Using dot2tex may be just fine for my purposes; I’m just wondering if there have been other developments or solutions that I might have missed?

You can insert “\n” for a line break - not sure if that counts as automatic?

Not if the newlines have to be manually inserted. :wink: I’m really just wondering if there have been any additional solutions, scripts, etc beyond the ones linked to above.

Such a script would be very welcome and a valuable addition to Graphviz. It would need to take into account node size, font width in points, node margin, etc. Maybe something in Python, or an ancillary tool in Graphviz. I know nothing about gvpr but maybe it would be up to the task.

1 Like