asciidoctor / asciidoctor-diagram

:left_right_arrow: Asciidoctor diagram extension, with support for AsciiToSVG, BlockDiag (BlockDiag, SeqDiag, ActDiag, NwDiag), Ditaa, Erd, GraphViz, Mermaid, Msc, PlantUML, Shaape, SvgBob, Syntrax, UMLet, Vega, Vega-Lite and WaveDrom.
http://asciidoctor.org
MIT License
439 stars 107 forks source link

ditaa-format=txt #401

Closed vinipsmaker closed 1 year ago

vinipsmaker commented 1 year ago

I'm using asciidoc to generate multiple outputs — manpages, PDF, ePUB, and online site through Antora — for documentation. So, when I choose to include diagrams, first I need to check whether the output for manpages will be good (that's the main output I consume personally). So, it comes as no surprise that ditaa interests me.

For PlantUML, I pass --attribute=plantuml-format=utxt in the command line and I get pretty good results for sequence diagrams in the manpages.

For ditaa, I'd expect to have the output be the same as the input when I'm generating manpages. Unfortunately, that is not the case. For ditaa, the output I get is the title enclosed in brackets which makes no sense for the reader. If I do try to force txt output by setting dita-format to txt, the result is a little better... something like:

Failed to generate image: Asciidoctor::Diagram::DitaaBlockProcessor does not support output format txt
+------------+----+------------+
|            :    :            |
| head of M1 | M2 | tail of M1 |
|            |    |            |
+------------+----+------------+

That's what I'll be using for now. However, I'd like to see the failure message gone.