From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christophe Garion Subject: Inlining TikZ blocks as SVG in HTML export Date: Wed, 09 Jan 2019 22:46:12 +0100 Message-ID: <87va2xwlln.fsf@port-garion.isae.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:47251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghLg8-0003X2-2Y for emacs-orgmode@gnu.org; Wed, 09 Jan 2019 16:46:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ghLg1-0004nv-VY for emacs-orgmode@gnu.org; Wed, 09 Jan 2019 16:46:20 -0500 Received: from smtpextng.isae.fr ([192.93.254.80]:52348) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghLg0-0004mt-2C for emacs-orgmode@gnu.org; Wed, 09 Jan 2019 16:46:16 -0500 Received: from smtp-int-tech (smtp-int-tech.isae.fr [10.132.1.56]) by smtpextng.isae.fr (Postfix) with ESMTP id 1585770CAD for ; Wed, 9 Jan 2019 22:46:13 +0100 (CET) Received: from smtp-secung (smtp-secung.isae.fr [192.93.254.79]) by smtp-int-tech (Postfix) with ESMTP id 57FA5407060 for ; Wed, 9 Jan 2019 22:46:07 +0100 (CET) Received: from port-garion (unknown [176.158.17.103]) by smtp-secung (Postfix) with ESMTPSA id F3D3C70CBA for ; Wed, 9 Jan 2019 22:46:12 +0100 (CET) Received: from [::1] (helo=port-garion) by port-garion with esmtp (Exim 4.92-RC3) (envelope-from ) id 1ghLfw-0005Z7-De for emacs-orgmode@gnu.org; Wed, 09 Jan 2019 22:46:12 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Hello, I would like to be able to export Org files containing TikZ pictures to HTML files with SVG pictures corresponding to TikZ pictures inlined directly in the HTML files. My use case is to produce quizz questions with graph drawings for the Moodle LMS (https://moodle.org/) used at our university. It is really painful to upload picture files to Moodle and link them to text and Moodle accepts plain HTML5 for text description, so it seems to be a rather food solution. Of course, I can use LaTeX source blocks to generate a SVG file like #+begin_src latex :results none :exports results :file "tree.svg" \usetikzlibrary{trees} \begin{tikzpicture} \node [circle, draw, fill=red!20] at (0,0) {1} child { node [circle, draw, fill=blue!30] {2} child { node [circle, draw, fill=green!30] {3} } child { node [circle, draw, fill=yellow!30] {4} }}; \end{tikzpicture} #+end_src but I must confessed that I am a bit lost with code blocks parameters and that I have not found how to properly inline SVG in HTML export. Sorry if the answer can be easily found on the web and thanks in advance, Christophe -- Christophe Garion GPG: 1982 15B2 64AC 3C34 532D BF19 6CD6 246C 62DA 5A7F