graphviz 中跨越多行的记录
我试图用点语言可视化一个相当复杂的结构。 因为记录很大,所以我想把代码写成多行。因此,而不是:
A11[label="A.11 Access Control|{A.11.1 Business requirements for access control|A.11.2 User access management}|{A.11.3 User responsibilities|A.11.4 Network access control}|{A.11.5 Operating System access control|A.11.6 Application & information access control}|A.11.7 Mobile computing & teleworking"];
我想像这样输入它
A11[label="A.11 Access Control|
{A.11.1 Business requirements for access control|A.11.2 User access management}|
{A.11.3 User responsibilities|A.11.4 Network access control}|
{A.11.5 Operating System access control|A.11.6 Application & information access control}|
A.11.7 Mobile computing & teleworking"];
不幸的是,点的解析器抱怨“字符串运行超过行尾”或类似的东西。有谁知道如何在代码中表示换行符?我在行尾尝试了 \
,但似乎不起作用。
提前致谢
I am trying to visualize a rather complex structure in the dot language.
Because the record is big, I would like to write the code in mulitple lines. So instead of:
A11[label="A.11 Access Control|{A.11.1 Business requirements for access control|A.11.2 User access management}|{A.11.3 User responsibilities|A.11.4 Network access control}|{A.11.5 Operating System access control|A.11.6 Application & information access control}|A.11.7 Mobile computing & teleworking"];
I would like to enter it somewhat like this
A11[label="A.11 Access Control|
{A.11.1 Business requirements for access control|A.11.2 User access management}|
{A.11.3 User responsibilities|A.11.4 Network access control}|
{A.11.5 Operating System access control|A.11.6 Application & information access control}|
A.11.7 Mobile computing & teleworking"];
Unfortunately the parser for dot complains about a "string running past line end" or something alike. Does anyone know how to denote a linebreak in the code? I tried a \
at the end of the line, but it didn't seem to work.
thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我猜你想要这样的东西:
你也可以这样做
I am guessing you want something like this:
You can also do like
使用
\
转义换行符而不终止字符串。请注意,您可以在每个{}
之前插入空格以缩进源代码中的行。该空白对生成的图形没有影响。演示 此处。
Use
\
to escape newlines without terminating the string. Note that you can insert whitespace before each{}
to indent the lines in the source code. This whitespace has no effect on the generated graph.Demo here.