0

I'm trying to output images using plantuml-mode. It seems I have plantuml-mode installed successfully, as I can activate the major mode, but I am unable to evaluate using C-c C-c:

PlantUML requires a ":file" header argument

Here is the code I am trying to evaluate:

#+BEGIN_SRC plantuml
@startuml
(*) --> "First Activity"
-->[You can put also labels] "Second Activity"
--> (*)
@enduml
#+END_SRC

And here is what I have in my .emacs file:

(require 'plantuml-mode)
(require 'ob-plantuml)
(add-to-list
   'org-src-lang-modes '("plantuml" . plantuml))

I have tried using plantuml-mode on a mac before and I never had to manually set a header argument. Can anyone help me figure this out?

1
#+BEGIN_SRC plantuml :file my_file.jpg

gives you a jpg file

#+BEGIN_SRC plantuml :file my_file.png

gives you a png file

#+BEGIN_SRC plantuml :file my_file.txt

gives you a txt file

#+BEGIN_SRC plantuml :file my_file.svg

gives you a svg file

The images are produced by imagemagick

0

I had the same issue. After looking at the source code I figured out it is expecting a file name as a parameter. This code should work:

#+BEGIN_SRC plantuml :file plantuml.svg
@startuml
(*) --> "First Activity"
-->[You can put also labels] "Second Activity"
--> (*)
@enduml
#+END_SRC

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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