emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Marcin Borkowski <mbork@mbork.pl>
To: Matt Price <moptop99@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: best ways to generate simple diagrams?
Date: Wed, 08 May 2019 06:06:05 +0200	[thread overview]
Message-ID: <877eb1mvyq.fsf@mbork.pl> (raw)
In-Reply-To: <CAN_Dec_zGiAJwPdiFNM_Z8=rQs-2=Y_tq83Ug2k02X6=tt+QkQ@mail.gmail.com>


On 2019-05-06, at 20:17, Matt Price <moptop99@gmail.com> wrote:

> So, I'm finding more and more that I want to include simple diagrams in my
> course materials. At present I am generating them as svg's using Inkscape,
> but that feels really tiresome to me. I would much rather make them
> programmatically, preferably including the source code as an org-mode block.
>
> I thought ditaa would be the tool for this, but I cannot figure out how to
> do this work efficiently in ditaa.  So for instance, I have this simple svg
> file (attached). It consists of two text-containing  symmetrical rectangles
> separated by a bit of whitespace and connected by two curved arrows (one
> pointing from each of the rectangles to the other).
>
> Trying to replicate this in ditaa did not prove easy.  Editing feels
> extremely labourious.  Am I missing something?  Is there a really good
> tutorial somehwere that I'm just not finding? Or is there maybe another
> tool I should be using instead?

Eric beat me to mentioning TikZ, which I've been using to create all
sorts of drawings for the past ten years or so.

Another TeX-related tool is METAPOST.  TikZ is apparently inspired by it
a lot, and it has some very nice features (like solving systems of
linear equations given in a declarative style to get intersection points
of straight lines - very handy).  There is another macro system built on
top of it, called METAFUN (https://wiki.contextgarden.net/MetaFun).

Since you mentioned exporting to HTML, d3.js came to my mind
immediately.  I don't have a lot of experience with it, and its main aim
is something different, but it's definitely worth knowing about.

Last but not least, I guess writing directly in SVG format might or
might not be what you want.  (I remember ye olden days when they said
that XML was something to be written and read by humans...  And in some
cases this is in fact true!)

Hth,

--
Marcin Borkowski
http://mbork.pl

      parent reply	other threads:[~2019-05-08  4:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-06 18:17 best ways to generate simple diagrams? Matt Price
2019-05-06 19:12 ` ckelty ckelty
2019-05-06 20:08 ` Heinz Tuechler
2019-05-07 11:25 ` Fraga, Eric
2019-05-07 17:22   ` Matt Price
2019-05-07 17:52     ` Fraga, Eric
2019-05-07 20:36       ` Matt Price
2019-05-07 20:51         ` Martin Schöön
2019-05-08  5:47           ` Fraga, Eric
2019-05-08  4:06 ` Marcin Borkowski [this message]

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=877eb1mvyq.fsf@mbork.pl \
    --to=mbork@mbork.pl \
    --cc=emacs-orgmode@gnu.org \
    --cc=moptop99@gmail.com \
    /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).