sytsereitsma / mdbook-plantuml

mdBook preprocessor to render PlantUML diagrams to png images in the book output directory
MIT License
76 stars 14 forks source link

Render plantuml from another page #20

Open TiesTheunissen opened 3 years ago

TiesTheunissen commented 3 years ago

In my main page I want to give an introduction to the diagram and further details. But the diagram itself I want it in another file. For example

if i combine the 2 files in 1 it works perfectly but i want them as seperete files that are combined into 1 page like

this diagram show the process of our company ```plantuml (./diagrams/process.puml) ```

sytsereitsma commented 3 years ago

So basically what you're asking is if it is possible to load a diagram from file rather than inline?

TiesTheunissen commented 3 years ago

Yes, indeed

From: Sytse Reitsmamailto:notifications@github.com Sent: Monday, March 1, 2021 9:05 PM To: sytsereitsma/mdbook-plantumlmailto:mdbook-plantuml@noreply.github.com Cc: TiesTheunissenmailto:tiestheunissen@hotmail.com; Authormailto:author@noreply.github.com Subject: Re: [sytsereitsma/mdbook-plantuml] Render plantuml from another page (#20)

So basically what you're asking is if it is possible to load a diagram from file rather than inline?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/sytsereitsma/mdbook-plantuml/issues/20#issuecomment-788233351, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AH5XJCOZJBIBGABGCCX3Z3LTBPXPFANCNFSM4UNUHH3Q.

signpainter commented 7 months ago

Not sure if still relevant, but it's possible using the include preprocessor directive of plantuml in combination with setting the plantuml include path.

  1. Set the search path by adding it to the plantuml-cmd
    plantuml-cmd="java -Dplantuml.include.path=. -jar plantuml.jar"
  2. Include external file into plantuml in target page
    @startuml
    !include diagrams/process.puml
    @enduml