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

Support for PlantUML "newpage" command #195

Open msgilligan opened 6 years ago

msgilligan commented 6 years ago

I'm creating a Use Case diagram with PlantUML inside an Asciidoctor document (I'm using inline Asciidoctor). When I use the PlantUML newpage command inside a diagram, I was hoping that the diagram would be split into two parts (pages) but still displayed as part of the same image in the rendered Asciidoc.

I don't want to duplicate the Actor and Use Case definitions in two separate diagrams. I'm willing to put the PlantUML markdown in a separate file if that will help render both "pages".

Is there a way to do this with the current code? If not, please consider this an enhancement request.

pepijnve commented 5 years ago

At the moment I think you'll need to extract the shared bits to a separate file and then include that from the two separate diagrams where you make use of the shared parts. There's a pretty strong assumption in the code at the moment that only a single image will be generated per diagram block.

In theory it's possible to support this and even generate an asciidoc page break where the newpage is, but then asciidoctor-diagram would have to operate as an AST manipulator while now it's just a block generator.

alonbl commented 4 years ago

Hi, I have a similar issue... The plantuml has limitation of diagram size, in long sequence diagrams, the only method to see the hidden parts is to split into new pages. Copying the participants is not sufficient as the grid is dynamic so the next diagram is not aligned. Thanks, Alon

tpraxl commented 1 year ago

Personal background

I found it best to add a "legend" to a PlantUML diagram after newpage, which properly places the legend below the diagram. I would very much appreciate the support of newpage.

Want to contribute

I am willing to look into solutions for this issue, and to support the implementation.

Problem

As far as I got the problem:

Alternative Approaches

I see two alternative approaches to support newpage:

Discussion wanted

I would appreciate a discussion with one of the maintainers on this topic.