an extension for sphinx to render plantuml in sphinx documents
Project description
sphinx-plantuml
introduction
sphinx-plantuml can render PlantUML figure in your Sphinx document without any dependencies in an instant
installation
you can install sphinx-plantuml by pip
.
python3 -m pip install sphinx-plantuml
setup
please add sphinxcontrib.plantuml
into your conf.py
file.
extensions = [
'sphinxcontrib.plantuml',
]
usage
you can use the following code to insert a figure into your document.
.. plantuml::
@startuml
Alice -> Bob: test
@enduml
sphinx-plantuml renders the figure in .svg
format, if you want .png
format, you can use :format:
argument.
.. plantuml::
:format: png
@startuml
Alice -> Bob: test
@enduml
if you want add a caption, you can use :caption:
argument.
.. plantuml::
:caption: this is caption
@startuml
Alice -> Bob: test
@enduml
sphinx-plantuml directive can load PlantUML code from file.
.. plantuml:: /the/path/of/file.uml
:caption: this is caption
sphinx-plantuml directive supports almost all arguments of sphinx builtin figure directive. for example, you can use :align:
argument to control the layout of the figure.
.. plantuml:: /the/path/of/file.uml
:caption: this is caption
:align: center
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for sphinx_plantuml-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e803a567d4f069f40b0c1bade2c3fb0d669b7c8226c9ae0f77d5b9fa336634ee |
|
MD5 | 5cc959fe877ea10d54ec798ff0ebafbd |
|
BLAKE2b-256 | dd9c53807726939886a18de46df3092241e475820b51c02777010b64e9c3a81e |