Usage
Once you enable this extension,
# Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinxcontrib.plantuml']
you may need to specify plantuml command in your conf.py:
plantuml = 'java -jar /path/to/plantuml.jar'
Instead, you can install a wrapper script in your PATH:
% cat <<EOT > /usr/local/bin/plantuml #!/bin/sh -e java -jar /path/to/plantuml.jar "$@" EOT % chmod +x /usr/local/bin/plantuml
Then, write PlantUML text under .. uml:: directive:
.. uml:: Alice -> Bob: Hi! Alice <- Bob: How are you?
or specify path to external PlantUML file:
.. uml:: external.uml
You can specify height, width, scale and align:
.. uml:: :scale: 50 % :align: center Foo <|-- Bar
You can specify a caption:
.. uml:: :caption: Caption with **bold** and *italic* :width: 50mm Foo <|-- Bar
For details, please see PlantUML documentation.
Configuration
- plantuml
Path to plantuml executable. (default: ‘plantuml’)
- plantuml_output_format
Type of output image for HTML renderer. (default: ‘png’)
- png:
generate only .png inside </img>
- svg:
generate .svg inside <object/> with .png inside </img> as a fallback
- svg_img:
generate only .svg inside <img/> (browser support)
- svg_obj:
generate only .svg inside <object/> (browser support)
- none:
do not generate any images (ignore uml directive)
When svg is inside <object/> it will always render full size, possibly bigger than the container. When svg is inside <img/> it will respect container size and scale if necessary.
- plantuml_latex_output_format
Type of output image for LaTeX renderer. (default: ‘png’)
- eps:
generate .eps (not supported by pdflatex)
- pdf:
generate .eps and convert it to .pdf (requires epstopdf)
- png:
generate .png
- none:
do not generate any images (ignore uml directive)
Because embedded png looks pretty bad, it is recommended to choose pdf for pdflatex or eps for platex.
- plantuml_epstopdf
Path to epstopdf executable. (default: ‘epstopdf’)
Metadata
Release files for sphinxcontrib-plantuml 0.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sphinxcontrib-plantuml-0.13.tar.gz | 7.0 kB | Details |
Release files / sphinxcontrib-plantuml-0.13.tar.gz
| Download URL | sphinxcontrib-plantuml-0.13.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ad647a4131027140bc2a4b0ac64b13841725090da5040c148ad9a3989136a14
|
|
BLAKE2b-256 checksum How to use checksums |
e20da4b35741b66849790b609e65db093b821682c1bc8b1b27fed2a1c551cce8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.1
|