Re: Plantuml support in asciidoctor, some uml formats work, others not so much...

From: Moin Rahman <bofh_at_freebsd.org>
Date: Mon, 20 Feb 2023 12:15:38 UTC

> On Feb 20, 2023, at 6:35 AM, Chris Watson <bsdunix44@gmail.com> wrote:
> 
> I felt this was the best list to ask about this, if it's not punt me in the right direction.
> I have a 13.1-RELEASE-p7 jail with all the 'latest' rubygem-asciidoctor-* pkg's installed.
> I was just starting to experiment with asciidoctor-diagram and I have noticed that some of plantumls formats work, and some do not. Here are two simple examples using this command line "asciidoctor -b html5 -o index.html -r asciidoctor-diagram example.adoc -w": 
> 
> plantuml that works:
> 
> [plantuml, format=svg]
> ....
> @startuml <>
> User -> (start)
> User --> (Use the application) : Label
> @enduml <>
> ....
> 
>  <>
> plantuml that does not work:
> 
> [plantuml, format=svg]
> ....
> @startuml
> object London
> 
> map CapitalCity {
>  UK *-> London
>  USA => Washington
>  Germany => Berlin
> }
> @enduml
> ....
> 
> The latter gives a syntax error. It's lifted directly from the plantuml wesbite examples so I'm not sure that error is correct? And I know that @startuml and @enduml *should* be optional in an asciidoc document when using asciidoctor-diagram. But it fails even without them.
> 
> The error is:
> 
> [From string (line 4)]
> @startuml <>
> object London
> 
> map CapitalCity {
> Syntax error?
> 
> Both work correctly in plantuml.com <http://plantuml.com/>'s demo server window that lets you enter uml to render. This also happens when using other formats like yaml or mindmap which is part of plantuml and asciidoctor-diagram is supposed to support as well. It seems hit or miss on what formats asciidoctor-diagram is able to render from the main plantuml.com <http://plantuml.com/> page. Is this an issue of asciidoctor-diagram? is it behind in supporting these formats? is it our port? Can anyone more well versed in the asciidoctor realm explain what's going on here?
> 
> Thank you very much!
> 
> Chris

We have a very old version of rubygem-asciidoctor-diagram. I am working on upgrading it. Additionally for plantuml you will also require java installed.

Kind regards,
Moin(bofh@ with docs@ hat on)