From: Matt Price <moptop99@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: best ways to generate simple diagrams?
Date: Tue, 7 May 2019 13:22:45 -0400 [thread overview]
Message-ID: <CAN_Dec_G4N_HBA85piQvc6L7X-fK+9bnt1khYWGOfKa=jxg=hA@mail.gmail.com> (raw)
In-Reply-To: <87ftpq33r4.fsf@ucl.ac.uk>
[-- Attachment #1: Type: text/plain, Size: 2318 bytes --]
These are all great. I am struggling to some extent through the docs for
all these tools. Eric, for the most part I'm very happy with graphviz &
plantufml but I would be interested in trying latex as well. Since I'm
mostly exporting to html and its derivatives (markdown mostly), I don't
think epxort blocks work for my purposes. I thought that a latex src block
with :exports results would work, but rather than a rendered graph I end up
with a .png of the latex instructions themselves. Here's what I am trying:
#+begin_src latex :exports results :file latex-dh.png
\begin{tikzpicture}[node distance=4cm,minimum size=2cm]
\node[draw,fill=blue!20!white] (humanities) {Humanities};
\node[draw,fill=blue!20!white] (tools) [right of=humanities]
{\parbox{3cm}{Computing \\ Tools and \\ Methodologies}}
edge [->,out=270,in=270,very thick,red] (humanities)
edge [<-,out=90,in=90,very thick,red] (humanities);
\end{tikzpicture}
#+end_src
Can you see my error and/or reproduce the issue? Thanks all of you!
On Tue, May 7, 2019 at 7:25 AM Fraga, Eric <e.fraga@ucl.ac.uk> wrote:
> On Monday, 6 May 2019 at 14:17, Matt Price 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.
>
> You have had recommendations for graphviz (dot etc.) and plantuml
> already. Those are very good suggestions and I use them all the
> time. For more general drawings, and given that you want something
> programmatic, I would also suggest tikz (in LaTeX) as it's very powerful
> (but then harder to do some simple things that graphiz/plantuml will do
> very easily).
>
> #+begin_export latex
> \begin{tikzpicture}[node distance=4cm,minimum size=2cm]
> \node[draw,fill=blue!20!white] (humanities) {Humanities};
> \node[draw,fill=blue!20!white] (tools) [right of=humanities]
> {\parbox{3cm}{Computing \\ Tools and \\ Methodologies}}
> edge [->,out=270,in=270,very thick,red] (humanities)
> edge [<-,out=90,in=90,very thick,red] (humanities);
> \end{tikzpicture}
> #+end_export
>
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.2.3-327-g3375f0
>
[-- Attachment #2: Type: text/html, Size: 2868 bytes --]
next prev parent reply other threads:[~2019-05-07 17:23 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 [this message]
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
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='CAN_Dec_G4N_HBA85piQvc6L7X-fK+9bnt1khYWGOfKa=jxg=hA@mail.gmail.com' \
--to=moptop99@gmail.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).