【发布时间】:2020-01-27 16:11:13
【问题描述】:
我想弄清楚 PlantUML 如何管理笔记。下面你可以看到一个小例子,其中的行为似乎有问题。
@startuml
package package{
'note bottom : this seems to be the correct place, but brings an error
artifact system
note right : this links to the system as it should
}
note bottom: This should link to the \npackage, not the last element\nin the package list.
note "Link to the package" as test
test .- package
@enduml
这段代码编译成下图:
如您所见,我想为一组元素添加注释。根据维基2,您可以使用
note bottom
将注释附加到最后定义的元素。当我在打开包后立即尝试此操作时,我得到一个编译错误,因为没有任何东西可以附加注释。因此,我尝试在包装关闭后直接添加注释底部。在这种情况下,注释附加到包内创建的最后一个元素。
我知道我可以创建注释并将它们链接到每个元素,如上一个示例所示。但是这里我不能使用right,left,top,bottom关键字来管理位置。有人知道这是一个错误还是我必须将我的注释放在代码中的其他位置?
【问题讨论】: