emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christophe Garion <tofgarion@runbox.com>
To: emacs-orgmode@gnu.org
Subject: Inlining TikZ blocks as SVG in HTML export
Date: Wed, 09 Jan 2019 22:46:12 +0100	[thread overview]
Message-ID: <87va2xwlln.fsf@port-garion.isae.fr> (raw)

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

             reply	other threads:[~2019-01-09 21:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-09 21:46 Christophe Garion [this message]
2019-01-21 13:49 ` Inlining TikZ blocks as SVG in HTML export Alan Schmitt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87va2xwlln.fsf@port-garion.isae.fr \
    --to=tofgarion@runbox.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).