3

I have recently started playing with the fantastic ob-mermaid (and its companion mermaid-mode) package. Combined with the mermaid CLI, these let you generate mermaid diagrams from org-babel source blocks. ob-mermaid requires a :file argument but I am wondering whether there is a way to redirect this to the default org-attach directory?

Here is an example code block:

#+BEGIN_SRC mermaid :file graph_td.svg

graph TD
  start --> stop

#+END_SRC

Any ideas?

1 Answer 1

2

Found this solution today, it creates the dir when necessary:

#+begin_src mermaid :file (concat (org-attach-dir t) "/example.png")
sequenceDiagram
A-->>B: Works!
#+end_src

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.