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
(*) --> "First Activity"
-->[You can put also labels] "Second Activity"
--> (*)

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

(require 'plantuml-mode)
(require 'ob-plantuml)
   '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?

2 Answers 2

#+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


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
(*) --> "First Activity"
-->[You can put also labels] "Second Activity"
--> (*)

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.