Coder Social home page Coder Social logo

plantuml's Introduction

PlantUML for Sphinx

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')

plantuml's People

Contributors

bosonogi avatar gmarull avatar henriksolver avatar mforbes avatar olivier-heurtier avatar rowang077 avatar vermeeren avatar wolfmanx avatar yuja avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.