All Projects → sphinx-contrib → plantuml

sphinx-contrib / plantuml

Licence: BSD-2-Clause license
No description or website provided.

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to plantuml

sphinx-substitution-extensions
Extensions for Sphinx which allow substitutions
Stars: ✭ 32 (-63.22%)
Mutual labels:  sphinx-extension
httpdomain
Documenting RESTful HTTP APIs
Stars: ✭ 51 (-41.38%)
Mutual labels:  sphinx-extension
puml2code
PlantUML code generator
Stars: ✭ 66 (-24.14%)
Mutual labels:  plantuml
c4sharp
C4Sharp (C4S) is a .net library for building C4 Model diagrams.
Stars: ✭ 159 (+82.76%)
Mutual labels:  plantuml
IPlantUML
A Python package which defines a PlantUML cell magic for IPython.
Stars: ✭ 85 (-2.3%)
Mutual labels:  plantuml
sphinx-codeautolink
Automatic links from code examples to reference documentation
Stars: ✭ 41 (-52.87%)
Mutual labels:  sphinx-extension
sphinxcontrib-django
This is a sphinx extension which improves the documentation of Django apps.
Stars: ✭ 37 (-57.47%)
Mutual labels:  sphinx-extension
sphinxcontrib-programoutput
Sphinx extension for capturing program output
Stars: ✭ 29 (-66.67%)
Mutual labels:  sphinx-extension
sphinx-hoverxref
Sphinx extension to show tooltips with content embedded when hover a reference.
Stars: ✭ 77 (-11.49%)
Mutual labels:  sphinx-extension
sphinxcontrib-hdl-diagrams
Sphinx Extension which generates various types of diagrams from Verilog code.
Stars: ✭ 37 (-57.47%)
Mutual labels:  sphinx-extension
typeorm-uml
Generate Entity Relationship diagrams for Typeorm powered projects.
Stars: ✭ 207 (+137.93%)
Mutual labels:  plantuml
sphinxext-rediraffe
Sphinx extension to redirect files
Stars: ✭ 27 (-68.97%)
Mutual labels:  sphinx-extension
plugins
Collection of builtin GNU TeXmacs plugins
Stars: ✭ 33 (-62.07%)
Mutual labels:  plantuml
makeitpdf
A close-to-code documentation helper
Stars: ✭ 15 (-82.76%)
Mutual labels:  plantuml
restbuilder
A Sphinx builder/writer to output reStructuredText (rst) files
Stars: ✭ 25 (-71.26%)
Mutual labels:  sphinx-extension
C4-PlantumlSkin
This library provides skinning to create C4 diagrams using PlantUml
Stars: ✭ 74 (-14.94%)
Mutual labels:  plantuml
autoprogram
Documenting CLI programs
Stars: ✭ 37 (-57.47%)
Mutual labels:  sphinx-extension
PlantUml.Net
a .Net wrapper for PlantUml
Stars: ✭ 35 (-59.77%)
Mutual labels:  plantuml
swagger2puml
Generate Class Diagrams (UML) for Given Swagger Definition
Stars: ✭ 43 (-50.57%)
Mutual labels:  plantuml
sphinx-toolbox
Box of handy tools for Sphinx 🧰 📔
Stars: ✭ 55 (-36.78%)
Mutual labels:  sphinx-extension

PlantUML for Sphinx

Installation

pip install sphinxcontrib-plantuml

Usage

Add sphinxcontrib.plantuml to your extensions list in your conf.py:

extensions = [
    'sphinxcontrib.plantuml',
]

You may also need to specify the 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 the .. uml:: directive:

.. uml::

   Alice -> Bob: Hi!
   Alice <- Bob: How are you?

or specify path to an external PlantUML file:

.. uml:: external.uml

You can specify height, width, scale and align:

.. uml::
   :scale: 50 %
   :align: center

   Foo <|-- Bar

You can also 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
tikz:generate .latex in the TikZ format
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')
plantuml_syntax_error_image
Should plantuml generate images with render errors. (default: False)
plantuml_cache_path
Directory where image cache is stored. (default: '_plantuml')
plantuml_batch_size

(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.

Developing

Install the python test dependencies with

pip install sphinxcontrib-plantuml[test]

In addition the following non-python dependencies are required in order to run the tests:

  • latexmk
  • plantuml
  • texlive
  • texlive-font-utils
  • texlive-latex-extra

The tests can be executed using pytest

pytest
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].