From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Embedding diagrams in Org Date: Wed, 18 Feb 2015 14:19:18 +0000 Message-ID: <87d2579uah.fsf@ucl.ac.uk> References: <87bnkr8kkg.fsf@wmi.amu.edu.pl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YO5TK-0002yN-Hf for emacs-orgmode@gnu.org; Wed, 18 Feb 2015 09:19:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YO5TH-0001xi-7U for emacs-orgmode@gnu.org; Wed, 18 Feb 2015 09:19:26 -0500 Received: from mail-db3on0140.outbound.protection.outlook.com ([157.55.234.140]:47328 helo=emea01-db3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YO5TG-0001xM-VF for emacs-orgmode@gnu.org; Wed, 18 Feb 2015 09:19:23 -0500 In-Reply-To: <87bnkr8kkg.fsf@wmi.amu.edu.pl> (Marcin Borkowski's message of "Wed, 18 Feb 2015 13:34:39 +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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Marcin Borkowski Cc: Org-Mode mailing list --=-=-= Content-Type: text/plain On Wednesday, 18 Feb 2015 at 13:34, Marcin Borkowski wrote: > Hello all, > > I need to embed some diagrams (graphs of functions, for instance, or > trees) in an Org file. Any suggestions on how to do it? In case of > ditaa, I can use a source block and the "results" line, and see the > image with C-c C-x C-v. Can I do a similar thing with Asymptote? How > hard/time-consuming would it be to add support e.g. for tikz or other > such tools? Support for tikz is there implicitly in that there is support for LaTeX. I use tikz all the time. Simple example attached. I do believe others have used asymptote in the past. HTH, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-843-ga5f1a3.dirty --=-=-= Content-Type: text/x-org Content-Disposition: attachment; filename="t.org" #+latex_header: \usepackage{tikz} * tikz with babel This example generates a figure using tikz and exports it as raw latex #+begin_src latex :results latex raw :exports results \begin{tikzpicture} \node[red!50!black] (a) {A}; \node (b) [right of=a] {B}; \draw[->] (a) -- (b); \end{tikzpicture} #+end_src Alternatively, you can put tikz inline: #+latex: \tikz \draw[rotate=30] (0,0) ellipse (6pt and 3pt); which should appear in the middle of the sentence. --=-=-=--