PlantUML の利用

PlantUML の利用#

Sphinx の文書に PlantUML の図を挿入するためには、次のようにする。

  1. PlantUML のホームページ から plantuml.jar をダウンロードする。

  2. 拡張機能をインストールする。

$ pip3 install sphinxcontrib-plantuml
  1. conf.py に設定を追加する。

extensions += ['sphinxcontrib.plantuml']
plantuml='java -jar $PLANTUML_JAR_PATH'
plantuml_output_format = 'svg'
plantuml_syntax_error_image = True
  1. 本文中に図を挿入する。

.. uml::

    A -> B: request
    return response

A -> B: request
return response