5

I have a large plantuml sequence diagram in blah.iuml. I would like to include it in my org-mode file so that it gets regenerated and included each time I export the org file to html. I don't want to maintain the file separately, and not just insert it into the org file. I'd hoped that something like this would work

#+begin_src plantuml :file blah.png
#+include "./blah.iuml"
#+end_src

I can see that it is trying to run plantuml on a file that contains

@startuml
#-include "./blah.iuml"

That is, the include is not doing an actual include when inside a #+begin_src.

Is there a way I can tell org-mode: "run plantuml on this file and pop the result into the generated html"?

3
  • 1
    Instead of wrapping the #+include statement in a src block, try: #+INCLUDE: "./blah.iuml" src plantuml
    – Tyler
    Commented Jan 19, 2018 at 18:17
  • 2
    Thanks! I got it to work with this: #+include "./blah.iuml" src plantuml :file blah.png
    – Rob
    Commented Jan 19, 2018 at 18:28
  • Welcome! Please post the accepted answer from comments. Thanks for your help!
    – Melioratus
    Commented Jan 21, 2021 at 15:33

1 Answer 1

1

This worked for me

#+begin_src plantuml :file ./0003_files/layout_architecture.svg
@startuml
!include 0003_files/layout_architecture.puml
@enduml
#+end_src

the layout_architecture.puml also contains @startuml and @enduml.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.