0

我已经正确安装了 Asciidoctor 及其扩展 asciidoctor-diagram,因为我可以生成 PlantUML 图,并且我想对 UMLet 做同样的事情。根据AsciiDoc 文档,可以在 AsciiDoc 文档中插入 UMLet 图。

因此,我使用 UMLet 创建了一个图表,并将其复制/粘贴到我的 AsciiDoc 文档中,如下所示:

[umlet]
...

 <diagram program="umlet" version="14.3.0">
  <zoom_level>10</zoom_level>
  <element>
    <id>UMLUseCase</id>
    <coordinates>
      <x>60</x>
      <y>100</y>
      <w>120</w>
      <h>40</h>
    </coordinates>
    <panel_attributes>Use case 1</panel_attributes>
    <additional_attributes/>
  </element>
  <element>
    <id>UMLActor</id>
    <coordinates>
      <x>230</x>
      <y>80</y>
      <w>60</w>
      <h>110</h>
    </coordinates>
    <panel_attributes>Actor</panel_attributes>
    <additional_attributes/>
  </element>
</diagram>

...

输出是,而不是预期的渲染图:

It opens the external program umlet but does not render anything :(
4

1 回答 1

2

请使用四个点 (....) 作为图表的块分隔符。

更改它会呈现您上面提供的示例。

由于我没有在路径中安装 umlet,因此我为此添加了属性

:umlet: C:\...\Umlet\Umlet.exe
于 2020-02-23T13:02:05.967 回答