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
#+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.