Bala's Blog

Exporting org document with inline SVG

September 15 2017
105 words, ~1 min. read
emacs,  org-mode,  svg 

In order to export SVGs as inline SVG as part of exporting an Org document as HTML, follow the steps mentioned below,

  1. Ensure to add :exports none :results drawer in the SRC block; for e.g. check the following code block using plantuml,
#+BEGIN_SRC plantuml :file test.svg :exports none :results drawer
  1. Evaluate the code block by pressing =C-c C-c=; check the results to ensure the file is indeed created,
#+RESULTS:
:RESULTS:
[[file:test.svg]]
:END:
  1. Now, #+INCLUDE the file to insert the contents of the file,
#+INCLUDE: "test.svg" export html
  1. Export the document by pressing C-c C-e h h
  1. Check the generated HTML by viewing in the browser