carlos-jenkins / plantweb

Plantweb is a Python client for the PlantUML server -
https://plantweb.readthedocs.io/
Apache License 2.0
27 stars 15 forks source link

Caption support #6

Open jessetan opened 7 years ago

jessetan commented 7 years ago

It is not possible to add a caption to a diagram. In Sphinx, this is done using the directive contents, but since the uml directive accepts uml as content, it would be better to use a :caption: option.

Implementation idea: Make class Plantweb inherit from Figure instead of Image and set the value of :caption: as the Figure directive contents. May change current behavior since Figure!=Image. Alternatively, just build and append a caption node in a way similar to Figure or sphinxcontrib-plantuml.

compiaffe commented 6 years ago

@jessetan Would this also allow for numerating uml diagrams like normal figures?

jessetan commented 5 years ago

If you're talking about Sphinx automatically adding "Figure XYZ" underneath a diagram, yes, that would happen if PlantWeb inherits from Figure

compiaffe commented 5 years ago

Yes that was my question. The plantuml plugin here: https://github.com/sphinx-contrib/plantuml Does already add the Figure XYZ but requires a locally deployed plantuml.jar