sphinx-contrib/plantuml

Plugin should support mindmaps

cleanerx opened this issue · 7 comments

Plantuml offers mindmaps through
@startmindmap
See https://plantuml.com/de/mindmap-diagram

However spinx 3.5.1 with sphinxcontrib-plantuml 0.19 delivers

WARNING: error while running plantuml
b'ERROR\n1\nSyntax Error?\nSome diagram description contains errors\n'

when used within sphinx

.. uml::

   @startmindmap
   * root node
      * some first level node
         * second level node
         * another second level node
      * another first level node
   @endmindmap

For me the example for mindmap-diagram on plantuml.com with the driective. I belive your syntax is wrong, you can check it on the live fiew in plantuml.com. I sugguest to close the ticket.

The OrgMode syntax works for me but Markdown doesn't.

The problem with the markdown mode is that it requires tabs (if you copy&paste the example, it will have tabs. If you use spaces instead, it's broken. With pure PlantUML, no sphinx involved).

Does sphinx maybe replace tabs with spaces, because it needs to remove the indentation that comes from the .. uml:: directive?

Workaround: Markdown mode with tabs works in an external PlantUML file.

.. uml:: external.uml

Another workaround: Use exactly one space for each level of indentation.

So, I think either sphinx should feed tabs or the right amount of spaces into PlantUML, or a bug should be filed against PlantUML to also accept multiple spaces.

Hello
The OrgMode mode does not work for me.
I have got "no @startuml" found" in the output using this

.. uml::
   :caption: blabla
   :align: center

   @startmindmap
   * Debian
   ** Ubuntu
   *** Linux Mint
   *** Kubuntu
   *** Lubuntu
   *** KDE Neon
   ** LMDE
   ** SolydXK
   ** SteamOS
   ** Raspbian with a very long name
   *** <s>Raspmbc</s> => OSMC
   *** <s>Raspyfi</s> => Volumio
   @endmindmap

I have tried also this

.. uml:: blabla.uml

I use the last version 0.25 of sphinxcontrib-plantuml

What's inside blabla.uml? When you run PlantUML manually on it, without sphinx, does it succeed?

Ho I realized the latest version on WSL (Ubuntu 20.04) for plantuml is ... 1:1.2018.13+ds-2).
So yes this is a plantuml problem which is too old and don't yet implement mindmap
I wonder how I can manage to have a more recent version.
Thanks !