Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

Sphinx "plantuml" extension

Project description


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

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 "$@"
% 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.


Path to plantuml executable. (default: ‘plantuml’)

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.


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.

Path to epstopdf executable. (default: ‘epstopdf’)
Should plantuml generate images with render errors. (default: False)
Directory where image cache is stored. (default: ‘_plantuml’)

(EXPERIMENTAL) Run plantuml command per the specified number of images. (default: 1)

If enabled, plantuml documents will be first written to the cache directory, and rendered in batches. This eliminates bootstrapping overhead of Java runtime and allows plantuml to leverage multiple CPU cores.

To enable batch rendering, set the size to 100-1000.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sphinxcontrib-plantuml, version 0.19
Filename, size File type Python version Upload date Hashes
Filename, size sphinxcontrib-plantuml-0.19.tar.gz (11.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page